loading a plist with many characters causes memory leak/infinite memory usage ? bug?

loading a plist with many characters causes memory leak/infinite memory usage ? bug?
0.0 0


Hi all,
First of all thanks to all for this wonderful effort, esp Max.

I have a little problem which is causing a huge problem.
Im porting a Hires iphone game to multi platforms, and hence im using all iphone resources.
I use plists to load images/animations.
But when I use multiple plists or a single large plist with many sprites on it the memory utilizatiuon is so huge it causes the game to crash.
(this happens when I load the plist)
I debugged it to a certain extent till the xml parser helper class and i notice it crashes there(actually, technically its not a class but a memory leak which causes a huge jump in memory consumption, even if I set icf file to 100megs)
any ideas what might be a problem is this a known bug?
I notice another user Andre Park had the same issue, did he manage to fix it if so please let me know.Thanks.



Thanks for your feedback, issue #712 created for this problem.


Thanks Bin, I am consulting with a senior developer to see if we can fix this, if so i will upload the corrected files.


I saw the sprite testbed and found some differences between the plists me and Mr. Park use and the one provided in the testbed, i am uploading the plists, as i suspect this may be the problem.


ignore my last post, it is not the case, the leak, as far as I can tell is random.


first remove all sprites frames that use texture, loaded from .plist file (/)
// output to “CCLOG” loaded textures and used size on memory
// “rc”
> look at retainCount when count is 0 texture is autorelease

// or use this manually remove texture (/)

void ReleaseTexture( const char * textureCacheName )
     CCTexture2D * previousScreen = CCTextureCache::sharedTextureCache()->textureForKey(textureCacheName);
          while( previousScreen->retainCount() > 1 )