demo cleanup part 5, fixed memory leaks in ConstraintDemo

This commit is contained in:
ejcoumans
2007-12-07 06:24:19 +00:00
parent c1a2debd3b
commit 9447dfdcfb
2 changed files with 61 additions and 11 deletions

View File

@@ -20,8 +20,22 @@ subject to the following restrictions:
///ConstraintDemo shows how to create a constraint, like Hinge or btGenericD6constraint
class ConstraintDemo : public DemoApplication
{
//keep track of variables to delete memory at the end
btAlignedObjectArray<btCollisionShape*> m_collisionShapes;
class btBroadphaseInterface* m_overlappingPairCache;
class btCollisionDispatcher* m_dispatcher;
class btConstraintSolver* m_constraintSolver;
class btDefaultCollisionConfiguration* m_collisionConfiguration;
public:
virtual ~ConstraintDemo();
void initPhysics();
virtual void clientMoveAndDisplay();