-
Notifications
You must be signed in to change notification settings - Fork 3
Fixing Memory Leaks
Henrik Vendelbo edited this page Oct 28, 2013
·
1 revision
When you are leaving the page the library will try to clean up using the "unload" event. However this might bee to late or never be called, so if possible call the following when you know that you are going to reload the page or navigate away.
function link_click(ev) {
Resolver("essential::cleanRecursively::")(document.body);
Resolver("page").set("state.livepage",false);
Resolver("page").set("state.launched",false);
}
If you have an <a href> the click event listener on the body will set "state.livepage" and
"state.launched" to false triggering a full discard.
This behavior can be disabled using a meta tag.