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(core): DebugElement.listeners not cleared on destroy #31820
fix(core): DebugElement.listeners not cleared on destroy #31820
Conversation
24e1346
to
88d83a0
Compare
Currently the `DebugElement.listeners` array are retained after the node is destroyed. This means that they'll continue to fire through `triggerEventHandler` and can cause memory leaks. This has already been fixed in Ivy, but these changes fix it in ViewEngine for consistency.
88d83a0
to
56c503b
Compare
Merge assistance: We should run a presubmit to see how break-ey this would be in G3, before we decide whether to merge it. |
@crisbeto thanks for the fix! I will run global presubmit tonight and report back all the findings. For now, I marked this PR as "blocked", so we don't merge it. |
VE Blueprint Presubmit (will run global presubmit tonight). |
FYI, VE Blueprint Presubmit indicated no problems caused by these changes (all targets passed). Will let you know the result after running global TAP tonight. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one nit
Quick update: Global TAP identified 1 target failing due to this change, however there might be more, since a portion of targets were in failed state already. I will try to make the broken target forward-compatible with this change and after that run another global TAP. Thank you. |
"Global TAP Presubmit 2" looks good, my plan is:
Thank you. |
Currently the `DebugElement.listeners` array are retained after the node is destroyed. This means that they'll continue to fire through `triggerEventHandler` and can cause memory leaks. This has already been fixed in Ivy, but these changes fix it in ViewEngine for consistency. PR Close #31820
FYI, the most recent Global TAP Presubmit indicated no failing targets related to this change, so I've merged this PR and will do a sync to google3. Thank you. |
Currently the `DebugElement.listeners` array are retained after the node is destroyed. This means that they'll continue to fire through `triggerEventHandler` and can cause memory leaks. This has already been fixed in Ivy, but these changes fix it in ViewEngine for consistency. PR Close angular#31820
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. |
Currently the
DebugElement.listeners
array are retained after the node is destroyed. This means that they'll continue to fire throughtriggerEventHandler
and can cause memory leaks. This has already been fixed in Ivy, but these changes fix it in ViewEngine for consistency.