I was just testing my application for leaks and I discovered 10 leaks that are baffling me.
They're all the same kind of leak too:
LEAKED OBJECT ADDRESS SIZE RESPONSIBLE LIBRARY RESPONSIBLE FRAME
GeneralBlock-64 0x2257f0 64 Bytes Quartz Core ensure_displays()
GeneralBlock-64 0x2256b0 64 Bytes Quartz Core ensure_displays()
GeneralBlock-64 0x225770 64 Bytes Quartz Core ensure_displays()
GeneralBlock-64 0x225630 64 Bytes Quartz Core ensure_displays()
GeneralBlock-64 0x2257b0 64 Bytes Quartz Core ensure_displays()
GeneralBlock-64 0x225670 64 Bytes Quartz Core ensure_displays()
GeneralBlock-48 0x225850 48 Bytes Quartz Core ensure_displays()
GeneralBlock-32 0x2256f0 32 Bytes Quartz Core ensure_displays()
GeneralBlock-48 0x2255e0 48 Bytes Quartz Core ensure_displays()
GeneralBlock-32 0x225550 32 Bytes Quartz Core ensure_displays()
They all show up right after I launch my app. I also tested this on the cocos 9.0 default template and they showed up there as well.
They stay there for as long as the app is running. The funny thing is I never got these leaks the first time I released my application, but now when I test my new version and my old version (the one I released) I get the leaks both times.
I also have a question about scene deallocation. I have two scenes in my app, but when I replace scenes my memory allocation just increases and never drops. Once I switch back to my first scene the memory allocation stays the same... Like the original scene was never removed from memory....
Switching to second scene:
-(void)creditsScene:(id)sender {
[[CCDirector sharedDirector] replaceScene:[CCFlipXTransition transitionWithDuration:0.5 scene:[Credits scene] orientation:kOrientationRightOver]];
}
Switching back to first scene:
-(void)iTissueScene:(id)sender {
[[CCDirector sharedDirector] replaceScene:[CCFlipXTransition transitionWithDuration:0.5 scene:[iTissue scene] orientation:kOrientationRightOver]];
}
Any ideas? I can post more code if you like.
Thanks and regards,
Joe