Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed Dec 28, 2011 2:19 am 
Offline

Joined: Tue Dec 04, 2007 7:48 pm
Posts: 25
I am wondering about btRigidBody and when you dynamically allocate these objects will Bullet delete them once you add them to btDiscreteDynamicsWorld?

e.g.
btRigidBody* groundRigidBody = new btRigidBody(groundRigidBodyCI);
dynamicsWorld->addRigidBody(groundRigidBody);

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()[i];
delete p;
}

Thanks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group