I've got a great problem and I don't understand very well why occurs. This is the case:
- Have a great project in Cocos2D with 10 scenes. Each scenes is a page of a book with huge sprites. It uses Kobold2D 1.0.2 implementation.
- Every page has common objects in a singleton class, to put a common menus via LayerColor.
- The sprites is TexturePacker in PVR.CCZ RGBA4444 and in iPad memory are around 16-20Mb every spritesheet loaded.
- I use CCTransitionTurnPage for replaceScene for one to the next one.
- At init method of each page (class), load the texture and FrameFile.
- At onExit method of each page (class), unload the textures and frameFile. I used the dumpCachedTextureInfo and says me textures load and unload from memory perfectly.
- Of course, I remove from child all objects. All my sprites are common variables declared on the interface section at .h, because I need to access them in every method of the class.
- My project is made with Kobold2D integration in a ARC project (but you know the attached Kobold2D project has ARC not enabled for compatibility problem)
The fact is when I start the project, everything seems perfect but memory is increasing for every scenes (page) I made. Page1: 30Mb., Page2: 40, Page 3: 54, Page 4: 65... After 7 or 8 scenes, Instruments, Xcode or the iPad itself hangs the application without any message (except Instruments with a final Low memory Warning).
Why there's no memory releasing after each scenes? Maybe it's because ARC and the no super dealloc variable. Why textures appears unload perfectly but seems like there's no unload because memory is growing without control until crash?