Hi all!
I'm experimenting with Bullet physics, using Ogre as the graphics engine, and BtOgre as a wrapper. Everything works fine, except that there are some strange memory leaks. With the help of a leak detector, I've found out that the problem is related to TriangleMeshShape. Doing a google search returned
this thread, and the sollution described there fixed the problem for me.
I had to modify the originally empty destructor in btTriangleMeshShape.cpp to this:
Code:
btTriangleMeshShape::~btTriangleMeshShape()
{
delete m_meshInterface;
}
But I gues this isn't supposed to be done this way, otherwise it would have been already added to the original code. So my question is, what is the correct way to do this? And how is this done in the Bullet demos? I did a search through all of the demo code, and there are a few TriangleMeshShapes created, but I found no clean-up procedure for them, and yet there are no memory leaks in any of them.
Thanks in advance.