fix memory leak in BulletMultiThreaded
Fixes Issue 271.
This commit is contained in:
@@ -248,6 +248,9 @@ void PosixThreadSupport::stopSPU()
|
||||
destroySem(spuStatus.startSemaphore);
|
||||
printf("semaphore destroyed\n");
|
||||
checkPThreadFunction(pthread_join(spuStatus.thread,0));
|
||||
|
||||
if(spuStatus.m_lsMemory)
|
||||
delete spuStatus.m_lsMemory;
|
||||
}
|
||||
printf("destroy main semaphore\n");
|
||||
destroySem(mainSemaphore);
|
||||
|
||||
@@ -299,6 +299,9 @@ void Win32ThreadSupport::stopSPU()
|
||||
CloseHandle(spuStatus.m_eventCompletetHandle);
|
||||
CloseHandle(spuStatus.m_eventStartHandle);
|
||||
CloseHandle(spuStatus.m_threadHandle);
|
||||
|
||||
if(spuStatus.m_lsMemory)
|
||||
delete spuStatus.m_lsMemory;
|
||||
}
|
||||
|
||||
m_activeSpuStatus.clear();
|
||||
|
||||
@@ -1157,6 +1157,8 @@ btParallelConstraintSolver::~btParallelConstraintSolver()
|
||||
{
|
||||
delete m_memoryCache;
|
||||
delete m_solverIO;
|
||||
delete m_barrier;
|
||||
delete m_criticalSection;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user