SoftBody initialize:
Code: Select all
m_softBody = btSoftBodyHelpers::CreateFromTriMesh(world->getSoftBodyWorldInfo(),gVertices,&gIndices[0][0],NUM_TRIANGLES);But if the softbody is colliding (i.e standing on a box) with a rigid body, the program will leave some memory leaks..
I dumped it with VLD and there are about 50 equal memory leaks.
Code: Select all
---------- Block 1576 at 0x046C97C8: 284 bytes ----------
Call Stack:
HINT: The following call stack may be incomplete. Setting "StackWalkMethod"
in the vld.ini file to "safe" instead of "fast" may result in a more
complete stack trace.
0x00566320 (File and line number not available): ?Evaluate@?$btSparseSdf@$02@@QAEMABVbtVector3@@PAVbtCollisionShape@@AAV2@M@Z
0x0056C8B7 (File and line number not available): ?checkContact@btSoftBody@@QBE_NPAVbtCollisionObject@@ABVbtVector3@@MAAUsCti@1@@Z
0x0056FEE1 (File and line number not available): ?DoNode@CollideSDF_RS@btSoftColliders@@QBEXAAUNode@btSoftBody@@@Z
0x00579B27 (File and line number not available): ??$collideTV@UCollideSDF_RS@btSoftColliders@@@btDbvt@@QAEXPBUbtDbvtNode@@ABUbtDbvtAabbMm@@AAUCollideSDF_RS@btSoftColliders@@@Z
0x0057AE0C (File and line number not available): ?defaultCollisionHandler@btSoftBody@@QAEXPAVbtCollisionObject@@@Z
0x00582234 (File and line number not available): ?processCollision@btSoftRigidCollisionAlgorithm@@UAEXPAVbtCollisionObject@@0ABUbtDispatcherInfo@@PAVbtManifoldResult@@@Z
0x0050C0F5 (File and line number not available): ?processOverlap@btCollisionPairCallback@@UAE_NAAUbtBroadphasePair@@@Z
0x025858AC (File and line number not available): (Function name unavailable)Code: Select all
m_worldInfo.m_sparsesdf.GarbageCollect();Any Idea?