Skip to content
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

fix(upgrade): fix memory leaks when the component is destroyed #39921

Closed
wants to merge 1 commit into from
Closed

fix(upgrade): fix memory leaks when the component is destroyed #39921

wants to merge 1 commit into from

Commits on Dec 2, 2020

  1. fix(upgrade): fix memory leaks when the component is destroyed

    Currently we're storing the real injector on the element inside the
    `ParentInjectorPromise` and its `resolve()` method. This causes a memory leak
    if we don't remove the reference when the component is destroyed.
    
    We also setup the `$destroy` listener and never release it, the problem
    is that this listener captures `this`, as long as there is a reference,
    `this` will not be GC'd.
    
    PR Close #39911
    arturovt committed Dec 2, 2020
    Copy the full SHA
    d3bb56c View commit details
    Browse the repository at this point in the history