canjs / can-stache

Live binding handlebars templates
https://canjs.com/doc/can-stache.html
MIT License
10 stars 13 forks source link

Fix memory leak in portal helper #686

Closed matthewp closed 5 years ago

matthewp commented 5 years ago

This fixes the memory leak in the portal helper. The problem was that we were never unregistering the call to domMutate.onNodeRemoval so there was always a pointer to the MutationObserver that is observing the document.

This adds a page in benchmark/portal-mem.html that can be used to find memory leaks.

Fixes #684