fix(upgrade): avoid memory leak when removing downgraded components#39965
Closed
gkalpak wants to merge 4 commits intoangular:masterfrom
Closed
fix(upgrade): avoid memory leak when removing downgraded components#39965gkalpak wants to merge 4 commits intoangular:masterfrom
gkalpak wants to merge 4 commits intoangular:masterfrom
Conversation
b667c27 to
830b3b0
Compare
|
You can preview 830b3b0 at https://pr39965-830b3b0.ngbuilds.io/. |
830b3b0 to
61baba2
Compare
|
You can preview 61baba2 at https://pr39965-61baba2.ngbuilds.io/. |
14 tasks
This commit removes some unused parameters, properties and variables in various `@angular/upgrade` functions.
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
61baba2 to
7d18ca3
Compare
|
You can preview 7d18ca3 at https://pr39965-7d18ca3.ngbuilds.io/. |
Contributor
Contributor
mhevery
pushed a commit
that referenced
this pull request
Dec 8, 2020
) This commit removes some unused parameters, properties and variables in various `@angular/upgrade` functions. PR Close #39965
mhevery
pushed a commit
that referenced
this pull request
Dec 8, 2020
…39965) 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 #26209 but for downgraded (instead of upgraded) components. Fixes #39911 Closes #39921 PR Close #39965
mhevery
pushed a commit
that referenced
this pull request
Dec 8, 2020
…39965) 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 #26209 but for downgraded (instead of upgraded) components. Fixes #39911 Closes #39921 PR Close #39965
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an alternative to #39921.
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 #26209 but for downgraded (instead of upgraded) components.
Fixes #39911
Closes #39921