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): avoid memory leak when removing downgraded components #39965

Closed
wants to merge 4 commits into from

Commits on Dec 7, 2020

  1. refactor(upgrade): remove unused parameters/properties/variables

    This commit removes some unused parameters, properties and variables in
    various `@angular/upgrade` functions.
    gkalpak committed Dec 7, 2020
    Copy the full SHA
    a5b61e1 View commit details
    Browse the repository at this point in the history
  2. fix(upgrade): avoid memory leak when removing downgraded components

    Previously, due to the way the AngularJS and Angular clean-up processes
    interfere with each other when removing an AngularJS element that
    contains a downgraded Angular component, the data associated with the
    host element of the downgraded component was not removed. This data was
    kept in an internal AngularJS cache, which prevented the element and
    component instance from being garbage-collected, leading to memory
    leaks.
    
    This commit fixes this by ensuring the element data is explicitly
    removed when cleaning up a downgraded component.
    
    NOTE:
    This is essentially the equivalent of angular#26209 but for downgraded (instead
    of upgraded) components.
    
    Fixes angular#39911
    Closes angular#39921
    gkalpak committed Dec 7, 2020
    Copy the full SHA
    0fe4233 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    b3f23b4 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    7d18ca3 View commit details
    Browse the repository at this point in the history