Memory leaks?

DevO
Posts: 95
Joined: Fri Mar 31, 2006 7:13 pm

Memory leaks?

Post 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?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post 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
DevO
Posts: 95
Joined: Fri Mar 31, 2006 7:13 pm

Post 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
DevO
Posts: 95
Joined: Fri Mar 31, 2006 7:13 pm

Post 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!