Resource Management with Bullet?

Please don't post Bullet support questions here, use the above forums instead.
Post Reply
Posts: 25
Joined: Tue Dec 04, 2007 7:48 pm

Resource Management with Bullet?

Post by Mars_999 » Wed Dec 28, 2011 2:19 am

I am wondering about btRigidBody and when you dynamically allocate these objects will Bullet delete them once you add them to btDiscreteDynamicsWorld?

btRigidBody* groundRigidBody = new btRigidBody(groundRigidBodyCI);

since I added it to dynamicsWorld will bullet delete it, or am I still responsible for deleting all my new'd objects?

So why do I need to do this if I even need to at all?

for(int i = dynamicsWorld->getNumCollisionObjects(); ++i)
btCollisionObject* p = dynamicWorld->getCollsionObjectArray();
delete p;


Post Reply