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();
delete p;
}
Thanks!