Problem with clean-up

Hi

I got a question about clean-up.

I'm using director and when checking texture memory usage I get the same values for each screen (don't know why).. I use removeSelf() for all display objects and nil them out too, as well as I remove event handlers from them (this part is done in clean method). Any ideas why it is like that?

Checked director example - the same thing there. I think it should at least change on each screen because there are different display objects.. Instead it is constant value always..

Thanks in advance :)

Sometimes you need to look at the memory after a delay. For example, the transition.to method keeps a reference to your object until the transition is complete. And when you call removeSelf(), make sure you call it recursively on any child objects.

Finally, remember that even after you remove something and set it to nil, the memory is not recovered until the garbage collection. You can call collectgarbage("collect") to force a garbage collection yourself.

Thanks your advice helped ;)

Maybe I'm asking a stupid question here, but how do I check my memory usage? I never see anything about memory in the Terminal.

could you please write small example, how to clean the memory ?

views:1510 update:2011/10/13 9:25:17
corona forums © 2003-2011