Fixed memory leak in btDbvtBroadphase
http://code.google.com/p/bullet/issues/detail?id=66
This commit is contained in:
@@ -159,7 +159,11 @@ clear(m_profiling);
|
||||
//
|
||||
btDbvtBroadphase::~btDbvtBroadphase()
|
||||
{
|
||||
if(m_releasepaircache) btAlignedFree(m_paircache);
|
||||
if(m_releasepaircache)
|
||||
{
|
||||
m_paircache->~btOverlappingPairCache();
|
||||
btAlignedFree(m_paircache);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -61,6 +61,7 @@ const int BT_NULL_PAIR=0xffffffff;
|
||||
class btOverlappingPairCache : public btOverlappingPairCallback
|
||||
{
|
||||
public:
|
||||
virtual ~btOverlappingPairCache() {} // this is needed so we can get to the derived class destructor
|
||||
|
||||
virtual btBroadphasePair* getOverlappingPairArrayPtr() = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user