Skip to content

Presence of detached DOM nodes due to scrollmagic after the scope is destroyed #5

Description

@vinaynb

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 (janpaepke/ScrollMagic#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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions