dangerdaveCS
01-03-2010 13:06:11
This is the second time I've been tripped up by a memory leak coming from OgreBullet. Am I not using OgreBullet correctly? Does it have some kind of cleanup function I'm not calling, hence the memory leaks? Anyway...
The constructor of TriangleMeshCollisionShape creates a btTriangleMesh and then uses that to construct a btBvhTriangleMeshShape. The btBvhTriangleMeshShape is freed on destruction, but the original btTriangleMesh is not, hence a memory leak.
The constructor of TriangleMeshCollisionShape creates a btTriangleMesh and then uses that to construct a btBvhTriangleMeshShape. The btBvhTriangleMeshShape is freed on destruction, but the original btTriangleMesh is not, hence a memory leak.