diff --git a/examples/MultiThreading/b3PosixThreadSupport.cpp b/examples/MultiThreading/b3PosixThreadSupport.cpp index 9a00d48aa..269579ab5 100644 --- a/examples/MultiThreading/b3PosixThreadSupport.cpp +++ b/examples/MultiThreading/b3PosixThreadSupport.cpp @@ -277,8 +277,8 @@ void b3PosixThreadSupport::stopThreads() destroySem(spuStatus.startSemaphore); printf("semaphore destroyed\n"); checkPThreadFunction(pthread_join(spuStatus.thread,0)); - - } + delete spuStatus.m_lsMemory; + } printf("destroy main semaphore\n"); destroySem(m_mainSemaphore); printf("main semaphore destroyed\n"); diff --git a/examples/SharedMemory/PhysicsServerExample.cpp b/examples/SharedMemory/PhysicsServerExample.cpp index 0d2908ae5..72b0d0598 100644 --- a/examples/SharedMemory/PhysicsServerExample.cpp +++ b/examples/SharedMemory/PhysicsServerExample.cpp @@ -756,6 +756,12 @@ public: delete m_debugDraw; m_debugDraw = 0; } + + for (int i=0;i