Page 1 of 1

Memory leaks?

Posted: Fri Mar 31, 2006 7:47 pm
by DevO
I have integrated Bullet in my system based on ConcaveDemo and now I have found some memory leaks.

This line will be not free
physObjects= new CcdPhysicsController( ccdObjectCi);
but if I try to free it my self I will get crash.

Do I missing something or is this a bug?

Posted: Fri Mar 31, 2006 9:08 pm
by Erwin Coumans
It might be a bug, but I'm willing to help.

Do you delete the physics controller after you delete the physics environment, or before? Probably best to do it after the physics environment.

Can you give more details about the crash, like a callstack?

Thanks,
Erwin

Posted: Fri Mar 31, 2006 9:28 pm
by DevO
I have tried both befor and after.
The problem seems to be with
CcdPhysicsEnvironment::removeCcdPhysicsControlle

I will look closet to this problem and report you all details.

Thanks for reply,
DevO

Posted: Fri Mar 31, 2006 9:56 pm
by DevO
Bullet uses in the most cases new and delete but also some alloca too form ODE.

Alloca can cause some problems with heap as I know from ODE.
It might be more flexible if Bullet could be use customezable memory allocation and deallocation.

So user can simple change to Debuger Manager to find all leaks.


But of couse Bullet is very promising library, so big thanks for it!