Example #1
0
PhysicsWorld::~PhysicsWorld()
{
    removeAllJoints(true);
    removeAllBodies();
    CC_SAFE_DELETE(_info);
    CC_SAFE_DELETE(_debugDraw);
}
PhysicsWorld::~PhysicsWorld()
{
    removeAllJoints(true);
    removeAllBodies();
    CC_SAFE_RELEASE(_delayRemoveBodies);
    CC_SAFE_RELEASE(_delayAddBodies);
    CC_SAFE_DELETE(_info);
    CC_SAFE_DELETE(_debugDraw);
}
PhysicsWorld::~PhysicsWorld()
{
    removeAllJoints(true);
    removeAllBodies();
    if (_cpSpace)
    {
        cpSpaceFree(_cpSpace);
    }
    CC_SAFE_DELETE(_debugDraw);
}
PhysicsWorld::~PhysicsWorld()
{
    removeAllJoints(true);
    removeAllBodies();
    if (_cpSpace)
    {
#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
		cpSpaceFree(_cpSpace);
#else
		cpHastySpaceFree(_cpSpace);
#endif 
    }
    CC_SAFE_RELEASE_NULL(_debugDraw);
}