How do I clean up both cocos2d and chipmunk shapes and bodies before I pull the plug on a scene and transition away from it? When I just call [[CCDirector sharedDirector] replaceScene:[CCTransitionFade transitionWithDuration:0.5 scene:[NewScene node]]]; It leaves bodies and items behind in the previous scene and they are still interacting. This is bad for the app + very bad for performance obviously! :P
Cleaning up after [[CCDirector sharedDirector] replaceScene:....
(4 posts) (2 voices)-
Posted 1 year ago #
-
release te retained nodes, google cocos2d(or ios) memory management.
Posted 1 year ago # -
Do I manually have to release them because I've heard that replaceScene auto calls deallocation of that scene and its contents?
Posted 1 year ago # -
I don't know with chipmunk, but you have to release spacemanager(which is a chipmunk wrapper) in the dealloc method.
Posted 1 year ago #
Reply
You must log in to post.