I have prepared a simple example in angular wherein it contains two views one with a simple button (state A) and the other (state B) contains the code of the demo page that you have for this plugin (http://homerjam.github.io/angular-scroll-magic/)
When you go from state A to B and then back to A the dom nodes of B should be destroyed and retained by garbage collector. But on taking heap snapshots it shows detached dom nodes of state B which are retained somehow by scrollmagic's javascript. Maybe there's something we are missing to destroy when the scope of B is destroyed.
I have also used the original Scrollmagic lib and in that too i am facing this issue of detached dom nodes which i have reported there as well (https://github.com/janpaepke/ScrollMagic/issues/510) but unfortunately there hasn't been any progress on that thread.
The source code link is attached and i have just modified your repo's code to have two views and switching with UI router. You can switch views and then check the heap snapshots to find detached nodes SourceCode
Let me know if there's any confusion regarding this issue.
Hello,
I have prepared a simple example in angular wherein it contains two views one with a simple button (state A) and the other (state B) contains the code of the demo page that you have for this plugin (http://homerjam.github.io/angular-scroll-magic/)
When you go from state A to B and then back to A the dom nodes of B should be destroyed and retained by garbage collector. But on taking heap snapshots it shows detached dom nodes of state B which are retained somehow by scrollmagic's javascript. Maybe there's something we are missing to destroy when the scope of B is destroyed.
I have also used the original Scrollmagic lib and in that too i am facing this issue of detached dom nodes which i have reported there as well (https://github.com/janpaepke/ScrollMagic/issues/510) but unfortunately there hasn't been any progress on that thread.
The source code link is attached and i have just modified your repo's code to have two views and switching with UI router. You can switch views and then check the heap snapshots to find detached nodes SourceCode
Let me know if there's any confusion regarding this issue.