Hi All…
I make games using cocos2d-1.0.1-0.9.1-x, size game is 150 mb, and resolution 1024x768, I run my games on device ipad1 and android devices (transformers-3.0 asus Honey Comb, acer inconia - 2.2 froyo) after some time the game is stop and close, and memory appear in the warning level = 2 debug xcode …
I run on Instruments Xcode , allocation memory is used more than 90 mb…
for the moving scene I use replaceScene … and I also have tired of trying to erase the memory that is not used, but still the same problem still appears …
and I also have added this code to solve the problem;
- (Void) applicationDidReceiveMemoryWarning: (UIApplication ) application {
/
Free up as much memory as possible by purging cached data objects That can be recreated (or reloaded from disk) later.
* /
cocos2d:: CCDirector:: sharedDirector () > purgeCachedData ;> removeUnusedTextures ();
cocos2d:: CCTextureCache:: sharedTextureCache
cocos2d:: CCTextureCache:: sharedTextureCache () > removeAllTextures ;> removeUnusedTextures ();
}
and put this code in every destructur scene…
cocos2d:: CCTextureCache:: sharedTextureCache
So, does anyone know how to solve this problem?
Thank you for your help ….