You don’t have to do anything special with deallocating, unless:
- You call retain(), then you must call release() later (usually inside your class destructor).
- You’ve already used too much memory for your textures. You’d better clear the texture cache every time you’re replacing scene. I always do this inside class destructor:
auto cacher = CCSpriteFrameCache::sharedSpriteFrameCache();
How do you replace your scene anyway? This is what I do if I’m replacing scene:
Signal 11, or officially know as “segmentation fault”, means that the program accessed a memory location that was not assigned. That’s usually a bug in the program. So if you’re writing your own program, that’s the most likely cause.
I assume that you’re developing for Android, LogCat should be enough for you. But for iOS you could use the XCode Profiler.