Forum Libraries, Components, and Plugins

The right way to dispose CCSpriteSheet

What is the right way to dispose a spritesheet? I have two screens which are shown one after the other, both with some heavy animations (using PNG spritesheets). On each screen I load the spritesheets from files into List. If I go from one screen to the other (using Director.ReplaceScene) I get a memory warning and then a crash.

I have tried clearing the before transition and calling GC.Collect() after that, but it crashes just the same.

If I display each of the screens on their own, they work fine.

What is the correct way to clear the memory before transition?

Sign In or Register to comment.