Add Storyboard events for the storyboard lifecycle (e.g. exitStoryboard)

One recommended way to store information that is common to multiple scenes is to place it in the storyboard table itself.

Here is an example:
For my navigation elements (which are pretty much common to all scenes) I would like to use the new image sheet capabilities that were recently introduced. Something like…

[blockcode]storyboard.navigationImageSheet = graphics.newImageSheet( filename, [baseDir,] options )[/blockcode]

… called once at startup. I would then be able to reference storyboard.navigationImageSheet from all the scenes. Keeping in mind that I am only using this as an example, I now want to clean up references prior to exiting (or pausing) the application. How can this be done?

I would like to be able to add an event listener for “exitStoryboard” so that I can set storyboard.navigationImageSheet to nil prior to the storyboard being disposed.

Does it make sense to add some additional events for the storyboard lifecycle? Or, since the app is closing anyway, should I not worry about properly releasing everything since the memory should be freed anyway?

I tried accessing storyboard from the system applicationExit event but, by that time, the storyboard has already been disposed of… [import]uid: 96955 topic_id: 23306 reply_id: 323306[/import]

As you say, the storyboard is only disposed at the time you leave your application. At that time nothing really matters. As I understand it, mobile apps run in a sandboxed environment, they can’t really go outside of it. So when you leave the app, the operating system gets rid of the sandbox as a whole. [import]uid: 61899 topic_id: 23306 reply_id: 93330[/import]

Good point as far as the memory goes…

Perhaps my example was bad. Here is another example:

I want to write out state information at the time the application is closed. (e.g. user preferences, game stats, etc.) That is more of an “app level” task than a “scene level” task. Having a exitStoryBoard event would allow me to handle that kind of activity cleaner as well. [import]uid: 96955 topic_id: 23306 reply_id: 93340[/import]