Open ThePaavero opened 8 years ago
Sure I can implement something like app.kill()
It would:
canvas
(if you are using layer)Then you would have to delete your app
object from global scope like
delete window.app
so it can be garbage collected.
Sounds ok?
On the other hand - if you don't want to wait for the update. Consider putting your games into IFRAMEs
Yeah, your suggestion sounds great. Global scope is fine as we won't be running more than one game at any given time.
Thanks a ton, and keep me/us updated!
@ThePaavero I have pushed new version. Sorry for the delay, I had many updates to merge.
app.kill()
should remove all bound events and the canvas from DOM tree
Thanks! I'll update the framework next week and report back if we run into any problems related to this. Thanks again!
I want to use this framework for a project where we'll be creating multiple games (within the same "page load") and will need to "destroy" instances on the fly. I can't seem to find a way to do that. Halp?