Does director clean EVERYTHING?

I use director class for all scenes in my game!

My question is: Does director REMOVE ALL DISPLAY OBJECTS when exiting from a scene as long as all the objects are inserted into the main group? apart from timers and listeners that is…

As of now, I manually remove each object manually and nil out all references to each object. Is this necessary or am I being overcautious? [import]uid: 64174 topic_id: 16040 reply_id: 316040[/import]

Satheesh, Corona SDK had change a while back that ensures when you remove a display object, it will remove all the child display objects so you get that for free.

When using Director, you are also correct that whatever you include in the group that you return to main from your individual scenes should get removed automagically.

That being said, you are also right on the mark in that YOU must still handle clean and responsible removal of timers, listeners, transitions and global variables for example.

So to answer your ?.. It sort of depends on how you reference things, if you are well localized in your variable declarations you will be in good shape when the scene goes away things will get garbage collected and released for something new. If you have global references to things that you think are being nil’d out or dropped from removing display objects you will pay the price and they will linger around.

Hope that helps, sounds like you are all over it!

–Croisened

[import]uid: 48203 topic_id: 16040 reply_id: 59626[/import]

Roger! Thanks for replying! :slight_smile: [import]uid: 64174 topic_id: 16040 reply_id: 60215[/import]