Question About Story Board Scene Purging

I have always used director but now i am leaning a bit towards storyboard and I think it works great.

Quick question. If i place the instruction:

storyboard.removeAll()

Inside function scene:exitScene( event ) Do I still need to remove all the objects using display.remove( ) function and point all my variables to nil or will story board do all the magic and free all scene objects from memory before in enters the new one?

All my objects are of course inserted in screengroup and I removed all the timers and listeners prior changing the scene.

Thanks a lot for your help

Steve [import]uid: 111657 topic_id: 32949 reply_id: 332949[/import]

Any item you dont insert into the storyboard group you need to remove manually.

if you insert them in the storyborad group then it removes them for you.

Larry
DoubleSlashDesign.com
[import]uid: 11860 topic_id: 32949 reply_id: 130873[/import]

Hey Larry,

Thanks for your reply. What about local variables. Do I need to point them to nil prior scene removal?
Thanks a lot

Steve [import]uid: 111657 topic_id: 32949 reply_id: 130875[/import]

Steve,

You do not need to explicitly nil variables prior to scene removal. Keep an eye on when you call removeAll(). The exitScene event occurs before the scene is removed. So, if you want to remove the current scene, try using the didExitScene event instead. Strange errors can happen if you try to remove the current scene on exitScene so wait until the scene has transitioned out before changing it. :slight_smile:
[import]uid: 168249 topic_id: 32949 reply_id: 130882[/import]

Any item you dont insert into the storyboard group you need to remove manually.

if you insert them in the storyborad group then it removes them for you.

Larry
DoubleSlashDesign.com
[import]uid: 11860 topic_id: 32949 reply_id: 130873[/import]

Thank you very much cooperlabs.

Yea you are right, I changed the instruction to the didExitScene Event.

[import]uid: 111657 topic_id: 32949 reply_id: 130894[/import]

Hey Larry,

Thanks for your reply. What about local variables. Do I need to point them to nil prior scene removal?
Thanks a lot

Steve [import]uid: 111657 topic_id: 32949 reply_id: 130875[/import]

Steve,

You do not need to explicitly nil variables prior to scene removal. Keep an eye on when you call removeAll(). The exitScene event occurs before the scene is removed. So, if you want to remove the current scene, try using the didExitScene event instead. Strange errors can happen if you try to remove the current scene on exitScene so wait until the scene has transitioned out before changing it. :slight_smile:
[import]uid: 168249 topic_id: 32949 reply_id: 130882[/import]

Thank you very much cooperlabs.

Yea you are right, I changed the instruction to the didExitScene Event.

[import]uid: 111657 topic_id: 32949 reply_id: 130894[/import]