I’m not sure if there is already a bug tracker for this one, please let me know if there is.
There seems to be a problem where memory is leaking, though there’s really no way to track where it is coming from. It was discovered by myself, and others as well (as there are other forum threads regarding the issue), from using the collectgarbage(“count”) function.
The problem is, when removing a group of objects (so it commonly occurs when switching scenes), collectgarbage(“count”) continues to report an increase in memory with every scene change. It just keeps climbing without leveling out whatsoever.
This is the case even after double, triple, and quadruple checking that no display objets are being left behind. That all are removed and nil’d out properly, and that all timers and transitions are cancelled and also nil’d out. Memory seems stable while within the scene and interacting with the app, however, when a “scene change” takes place, memory climbs.
With smaller scenes, the number increases slightly, however, with some scenes it goes up pretty significantly (sometimes 50-100k!) and never goes back down. Like I said, it happens even with small scenes where it is easy to see that I have cleaned everything up properly.
It should also be noted that Texture Memory seems perfectly fine throughout. It is higher on bigger scenes, and when a scene is unloaded, it goes back down, etc.
Here are a couple more forum threads that discuss the issue:
http://developer.anscamobile.com/forum/2011/01/31/memory-problems-using-director-class
Please let me know when this bug is officially documented.
Thank you very much,
Jonathan Beebe [import]uid: 7849 topic_id: 7539 reply_id: 307539[/import]