Page 1 of 1

Memory leak problem after applying "Internal Edge Utility"

Posted: Sat Dec 24, 2011 7:05 am
by hurricane
Hi,

I am a new bie in the world of Bullet Physics. I have applied Internal Edge Utility in my project as per the bullet physics example demo "AppInternalEdgeDemo".

When I quit my project,I am getting memory leak error in following part of the code:


btTriangleInfoMap* triangleInfoMap = new btTriangleInfoMap();

btGenerateInternalEdgeInfo(trimeshShape,triangleInfoMap);

I don't have any idea how to delete( i.e. free memory) this triangleInfoMap object.


Please give your valuable suggestions...



Regards

huRRc@ne

Re: Memory leak problem after applying "Internal Edge Utilit

Posted: Fri Dec 30, 2011 9:01 am
by Karrok
add

btTriangleInfoMap* triangleInfoMap;

as member in the header

and triangleInfoMap = new btTriangleInfoMap();

in the cpp, then delete it in the destructor.