我创建了cocos2d游戏。在测试期间我得到了一些内存警告,我解决了ipad3(新的ipad)中的所有内存警告,但我无法在ipad 1中解决以下内存警告。你们可以帮助我....
1
2012-08-01 22:19:16.399 Game[238:707] cocos2d: CCSpriteFrameCache: Trying to use file 'Animation.png' as texture
2012-08-01 22:19:16.662 Game[238:707] cocos2d: CCSpriteFrameCache: Trying to use file 'Ani.png' as texture
2012-08-01 22:19:16.681 Game[238:707] cocos2d: CCSpriteFrameCache: Trying to use file 'Faces.png' as texture
2012-08-01 22:19:16.753 Game[238:707] cocos2d: removeChildByTag: child not found!
2012-08-01 22:19:16.819 Game[238:707] Received memory warning.
2
2012-08-01 22:23:11.573 Game[238:707] cocos2d: Received memory warning.
2012-08-01 22:23:11.573 Game[238:707] cocos2d: CCTextureCache: removing unused texture: img.jpg
2012-08-01 22:23:11.576 Game[238:707] cocos2d: CCTextureCache: removing unused texture: play.png
2012-08-01 22:23:11.582 Game[238:707] cocos2d: CCTextureCache: removing unused texture: img1.png
2012-08-01 22:23:11.585 Game[238:707] cocos2d: CCTextureCache: removing unused texture: youNeedToPopup.png
2012-08-01 22:23:11.590 Game[238:707] cocos2d: CCTextureCache: removing unused texture: popup.png
2012-08-01 22:23:11.599 Game[238:707] cocos2d: CCTextureCache: removing unused texture: conti.png
感谢
答案 0 :(得分:0)
内存警告完全正常。实际上,这是允许iOS重新使用可以释放并继续工作而不会崩溃的内存的机制。
您可以在仪器分配工具中观察到:内存逐渐被填满;然后发送一个内存警告,你会很快看到内存被释放(直到某一点)。这是健康应用的标志。
您应该担心的是,当发出内存警告时,内存不会被恢复。但随后你的应用程序会被迅速杀死。
因此,内存警告+应用程序不会崩溃根本不用担心。