- keep track of all memory allocations (gNumAllignedAllocs/gNumAllignedFree)

All memory allocations in Bullet go through btAlignedAlloc/btAlignedFree
Fix in hinge constraint constructors, thanks Marcus Hennix!
This commit is contained in:
ejcoumans
2007-10-22 22:23:10 +00:00
parent 1b70c4e5c9
commit ec76f2e0a3
18 changed files with 210 additions and 113 deletions

View File

@@ -46,7 +46,7 @@ m_gravity(0,0,-10)
btSimpleDynamicsWorld::~btSimpleDynamicsWorld()
{
if (m_ownsConstraintSolver)
delete m_constraintSolver;
btAlignedFree( m_constraintSolver);
}
int btSimpleDynamicsWorld::stepSimulation( btScalar timeStep,int maxSubSteps, btScalar fixedTimeStep)
@@ -205,7 +205,7 @@ void btSimpleDynamicsWorld::setConstraintSolver(btConstraintSolver* solver)
{
if (m_ownsConstraintSolver)
{
delete m_constraintSolver;
btAlignedFree(m_constraintSolver);
}
m_ownsConstraintSolver = false;
m_constraintSolver = solver;