-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Transition] prevent memory leak #21
Labels
Milestone
Comments
I appreciate the legwork you're putting in. I'll dig into this before releasing "final" |
This was referenced May 31, 2017
3 tasks
christopherthielen
added a commit
to ui-router/core
that referenced
this issue
Jan 21, 2018
The treeChanges object has references to the PathNodes from the previous transition (`.treeChanges("from")`). The PathNode object has resolve data inside it. The previous transition is reachable via a resolve (via tokens: `"$transition$"` or `Transition`). Through this chain, all other transitions are reachable and not eligible for GC. This change cleans out the previous Transition object from the resolves, but only after a transition has been evicted from the `successfulTransitions` queue. The `successfulTransitions` queue currently has a max size of 1, so the transition is cleaned up once it is no longer the current nor previous transition (it is cleaned when it's the previous previous transition); Fixes #55 Fixes angular-ui/ui-router#3603 Fixes ui-router/angular#21
christopherthielen
added a commit
to ui-router/core
that referenced
this issue
Feb 12, 2018
…les*.data Fixes #55 Fixes angular-ui/ui-router#3603 Fixes ui-router/angular#21
wawyed
pushed a commit
to wawyed/core
that referenced
this issue
Mar 3, 2018
The treeChanges object has references to the PathNodes from the previous transition (`.treeChanges("from")`). The PathNode object has resolve data inside it. The previous transition is reachable via a resolve (via tokens: `"$transition$"` or `Transition`). Through this chain, all other transitions are reachable and not eligible for GC. This change cleans out the previous Transition object from the resolves, but only after a transition has been evicted from the `successfulTransitions` queue. The `successfulTransitions` queue currently has a max size of 1, so the transition is cleaned up once it is no longer the current nor previous transition (it is cleaned when it's the previous previous transition); Fixes ui-router#55 Fixes angular-ui/ui-router#3603 Fixes ui-router/angular#21
wawyed
pushed a commit
to wawyed/core
that referenced
this issue
Mar 3, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I noticed the memory is growing after each new transition
I did some debugging and I noticed that all created transition not destroyed due to the usage of it's reference in:
The text was updated successfully, but these errors were encountered: