I have to removeChild() after that I destroyed the variable?

Hi there, inside my application there will be a button that when you press on, it will "reset" of the entire application and start over.

Now I have 2 questions.

One is, if I want to completely destroy a variable and clear the cache, I have use = null; for all the right variable?

The second is, after I destroyed a variable of the image. Should I always use removeChild() to remove it?

addChild and removeChild adds and deletes objects from the display list. removeChild, does not remove the object, it just removes it from the display list. It's probably cleaner to remove it from the display list and then setting it null, so that the display list loop not on something that does not exist. Is not necessary, but cleaner.

Tags: BlackBerry Developers

Similar Questions

Maybe you are looking for