I have an html5 app that should only run occasionally in a long-lived page. I load it with lime.embed, is there a way to later completely unload it so that there’s no code left running?
I tried to remove the root Sprite from the stage and also remove the app’s root DOM element, but this does not completely stop all activity. If I repeatedly load/unload the app 10 times, then (with the app left unloaded) the cpu runs at 20% and dev tools’ profiler shows that chrome spends 20% of its time scripting.
Any better solution?