For example is there a one line code that I can add into a listener function that does the equivalent of me pressing command and “R” on my macbook? Thanks! [import]uid: 35535 topic_id: 32199 reply_id: 332199[/import]
Are you Using Storyboard? If so you can just program a button behavior than when you press it it purges the current scene and load the same scene again. This will reset everything and enter that scene again. [import]uid: 111657 topic_id: 32199 reply_id: 128220[/import]
Unfortunately not. I’ll keep that in mind next time though. Is there another way? [import]uid: 35535 topic_id: 32199 reply_id: 128225[/import]
You don’t need to use Storyboard or Director, but even if you do (or don’t), cleanup and “reset” is a meticulous process. You can’t just assume that Storyboard or Director “cleanup” will reset your app… they clean up display objects and some other things, but they do NOT clean up listeners, timers, storage tables, etc. I can’t emphasize this enough… as you build your app, always keep a list of things that will need to be cleaned and nil’ed out on reset. If you miss any, you’ll get the inevitable memory leak, and we all know how bad those are. 
Brent [import]uid: 9747 topic_id: 32199 reply_id: 128241[/import]
Are you Using Storyboard? If so you can just program a button behavior than when you press it it purges the current scene and load the same scene again. This will reset everything and enter that scene again. [import]uid: 111657 topic_id: 32199 reply_id: 128220[/import]
Unfortunately not. I’ll keep that in mind next time though. Is there another way? [import]uid: 35535 topic_id: 32199 reply_id: 128225[/import]
You don’t need to use Storyboard or Director, but even if you do (or don’t), cleanup and “reset” is a meticulous process. You can’t just assume that Storyboard or Director “cleanup” will reset your app… they clean up display objects and some other things, but they do NOT clean up listeners, timers, storage tables, etc. I can’t emphasize this enough… as you build your app, always keep a list of things that will need to be cleaned and nil’ed out on reset. If you miss any, you’ll get the inevitable memory leak, and we all know how bad those are. 
Brent [import]uid: 9747 topic_id: 32199 reply_id: 128241[/import]
I also want to know how to reset an app!
I do not use storyboard because my game is only one scene. It is very simple and I doubt any leaking will occur.
are there any code snippets out there I can use perhaps?
Thank you guys! [import]uid: 181568 topic_id: 32199 reply_id: 128404[/import]
I also want to know how to reset an app!
I do not use storyboard because my game is only one scene. It is very simple and I doubt any leaking will occur.
are there any code snippets out there I can use perhaps?
Thank you guys! [import]uid: 181568 topic_id: 32199 reply_id: 128404[/import]