more memory leak fixes in demo and btSimpleBroadphase.

- deleting object (END key) needs to release
- call destructor of pair cache
This commit is contained in:
ejcoumans committed 2007-10-31 08:17:48 +00:00
1 parent a101719687
commit a146bbc293
3 files changed
+11 -1

No files matched your search

@@ -77,6 +77,7 @@ btSimpleBroadphase::~btSimpleBroadphase()
if (m_ownsPairCache)
{
m_pairCache->~btOverlappingPairCache();
btAlignedFree(m_pairCache);
}
}
@@ -77,7 +77,7 @@ protected:
void freeHandle(btSimpleBroadphaseProxy* proxy)
{
int handle = int(proxy-m_pHandles);
btAssert(handle > 0 && handle < m_maxHandles);
btAssert(handle >= 0 && handle < m_maxHandles);
proxy->SetNextFree(m_firstFreeHandle);
m_firstFreeHandle = handle;