The method of cleaning: #if CC_USE_PHYSICS cpBody* shared = PhysicsShapeInfo::getSharedBody(); if( shared ) cpBodyFree( shared ); #endif