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

Upgraded element children not destroyed/cleaned #26208

Closed
jbedard opened this issue Oct 2, 2018 · 1 comment
Closed

Upgraded element children not destroyed/cleaned #26208

jbedard opened this issue Oct 2, 2018 · 1 comment
Milestone

Comments

@jbedard
Copy link
Contributor

jbedard commented Oct 2, 2018

I'm submitting a...

[X] Bug report  

Current behavior

UpgradeComponent.ngOnDestroy (actually UpgradeHelper.onDestroy) invokes $element.triggerHandler('$destroy') on the upgraded element itself but does not a) cleanup data + event bindings and b) do anything on child elements

Expected behavior

Destroying an upgraded AngularJS component should do the same as destroying in AngularJS. All data + events should be cleaned up and the $destroy DOM event should be triggered, on the element itself and all descendants.

Minimal reproduction of the problem with instructions

https://angular-gitter-nrsm9m.stackblitz.io/ (the red square should be cleaned up along with the upgraded component)

What is the motivation / use case for changing the behavior?

Putting an AngularJS component in Angular should perform proper cleanup, not leak memory.

Environment

Angular version: 6.1.7, but has probably existed forever

jbedard added a commit to jbedard/angular that referenced this issue Oct 2, 2018
jbedard added a commit to jbedard/angular that referenced this issue Oct 2, 2018
jbedard added a commit to jbedard/angular that referenced this issue Oct 2, 2018
@ngbot ngbot bot added this to the needsTriage milestone Oct 2, 2018
@gkalpak gkalpak added effort1: hours freq1: low memory leak Issue related to a memory leak labels Oct 2, 2018
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Oct 2, 2018
jbedard added a commit to jbedard/angular that referenced this issue Oct 5, 2018
jbedard added a commit to jbedard/angular that referenced this issue Oct 5, 2018
jbedard added a commit to jbedard/angular that referenced this issue Oct 5, 2018
wmarques pushed a commit to wmarques/angular that referenced this issue Oct 14, 2018
FrederikSchlemmer pushed a commit to FrederikSchlemmer/angular that referenced this issue Jan 3, 2019
FrederikSchlemmer pushed a commit to FrederikSchlemmer/angular that referenced this issue Jan 3, 2019
FrederikSchlemmer pushed a commit to FrederikSchlemmer/angular that referenced this issue Jan 3, 2019
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants