Memory Management

Hi!

I'm currently working on a project that contain a lot of images. All file are process by TexturePacker as .plist. CocosSharp load all files in memory and display the Scene 1 perfectly.

When I'm left this scene and load the Scene 2, I currently execute there 2 lines:

CCSpriteFrameCache.SharedSpriteFrameCache.RemoveUnusedSpriteFrames ();

CCTextureCache.SharedTextureCache.RemoveUnusedTextures ();

And If I check the count of the dictionary, all textures are well unload and that good!

The problem begin here, I receive a lot of memory warning and the application crash with i'm switch from scene 1 to 2 back to 1 and back to 2! If I load instruments, I can see the memory usage growing about 20 MO per scene change but that all the same images and sprites!! Someone have a hint ?

Sorry for my english, I speak french and I do my best :)

Simon

Posts

  • RamiTabbaraRamiTabbara AUMember, Xamarin Team Xamurai

    Hi Simon,

    Would you be able to please provide a sample/excerpt of the project you're working on so that we can replicate the issue you're encountering?

    If you want you can send me this information as a private message.

  • SimonSheehySimonSheehy USMember

    Hi! Sorry for the delay, I got a bad flu (influenza) during the vacation ! I just build a very light version of the app and if you check the line 77 on JJambo.cs, before and after the CCSpriteFrameCache.SharedSpriteFrameCache.RemoveSpriteFrames, the count don't change.

    You can change the scene by hitting the screen, each time (after first tour) you touch the app, the memery usage will grow after 6MO (20 in the real app).

    We have a lot of images, so I put the zip on Dropbox because Im not sure I can upload 150 MO on that forum!

    Thanks a lot !!!!

    Simon

    File : https://dl.dropboxusercontent.com/u/3238521/Jambo.Lite.zip

  • SimonSheehySimonSheehy USMember

    rtab, have the the time to check the projet ?

    Thanks a lot !

    Simon

  • RamiTabbaraRamiTabbara AUMember, Xamarin Team Xamurai

    Hi Simon,

    I'll aim to look at this asap. Thanks for providing a sample

Sign In or Register to comment.