I’m still working on my IOS game and continually see it crash. Crash meaning it will just go black and back to the main menu. Soon I discovered that memory management is now more important than ever. If you think the garbage collector is working, it’s actually not. You’ve just been lucky that your computer didn’t run out of memory by the time it shut down.
When it comes to mobile there is no avoiding this, and at times its even harder than normal memory management. Everything you NEW you must null when you’re done. And that’s not enough, you also have to remove all listeners, dispose all bitmaps, null all sounds. Too bad, I wanted to avoid memory management, Objective C was a nightmare.
Learn how to change your code here:
Then afterwards, learn about putting Flash Preload Profiler into your projects:
UPDATE#1: I’ve had a lot of problems here, my game never cleans up its garbage even on the normal Flash player. Some movieclips never get cleaned up, the profiler says there’s 100 instances. And I nulled/delete/dispose/removeEventListener the crap of it. No luck yet.
UPDATE#2: I’m moving to Corona SDK. Bye Flash, I still need you for my day job.