Final stages of releasing an app; memory and cleanup help required

Hi,

we are a app dev company foraying into educational apps for kids(toddlers).

we use director 1.2 and have a clean function in each module. we have reviewed each module to ensure that eventlisteners, timers, runtime listeners and displayobjects are all removed from the group and set to nil. we have ensured all local variables and functions.

yet, when we monitor memory based on memory monitor, we find that though the texture memory returns to normal as expected, the LUA memory, colletgarbage(count) increases consistently as we use our app.

is this because we are doing this in the simulator? do we need to also set the director group to nil?

Also is there a way to check this in xcode when the app is running on the device itself?

One more: is it necessary also to trap the "App exit" event to cleanup the main menu screen? or is that taken care by iOS when it kills the app?

Thanks a lot!

Memory leaks can be tough to find, look for area in your code that you can comment out and see if you can get the memory under control.

In particular I look for loops where I am adding things to the screen and such...

In one case, I had a simple score that I was updating, however rather than just updating the text I was actually repainting the background of my scoreboard each time it updated and to top it off I wasn't adding it into the returned displayGroup for that module and well it spun out of control pretty quickly.

Just keep commenting out until you find that memory get stable, then seal the leak.

Good Luck!

--Croisened

views:1443 update:2011/9/28 9:01:40
corona forums © 2003-2011