Merge pull request #1664 from erwincoumans/master

PyBullet: fix some memory leaks
This commit is contained in:
erwincoumans
2018-05-02 13:54:07 -07:00
committed by GitHub
3 changed files with 9 additions and 2 deletions

View File

@@ -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");

View File

@@ -756,6 +756,12 @@ public:
delete m_debugDraw;
m_debugDraw = 0;
}
for (int i=0;i<m_userDebugParams.size();i++)
{
delete m_userDebugParams[i];
}
m_userDebugParams.clear();
}
void setCriticalSection(b3CriticalSection* cs)

View File

@@ -3551,6 +3551,7 @@ static PyObject* pybullet_getJointStates(PyObject* self, PyObject* args, PyObjec
return NULL;
}
}
Py_DECREF(jointIndicesSeq);
return resultListJointState;
}
}