BGE bug #17858 fixed: [SHOWSTOPPER] BGE Memory leak. The memory leak has been identi...
[blender.git] / extern / bullet2 / src / BulletSoftBody / btSoftBodyRigidBodyCollisionConfiguration.cpp
index e79dd214e6200e911f6856237198bad16a79dc57..53ac27825834dbe256f249ba665c997c714ca649 100644 (file)
@@ -62,6 +62,7 @@ btSoftBodyRigidBodyCollisionConfiguration::btSoftBodyRigidBodyCollisionConfigura
                collisionAlgorithmMaxElementSize = btMax(collisionAlgorithmMaxElementSize,maxSize2);
                if (collisionAlgorithmMaxElementSize > curElemSize)
                {
+                       m_collisionAlgorithmPool->~btPoolAllocator();
                        btAlignedFree(m_collisionAlgorithmPool);
                        void* mem = btAlignedAlloc(sizeof(btPoolAllocator),16);
                        m_collisionAlgorithmPool = new(mem) btPoolAllocator(collisionAlgorithmMaxElementSize,constructionInfo.m_defaultMaxCollisionAlgorithmPoolSize);