You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Memory leak with animations in combination with @HostBinding #24197
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x ] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
Current behavior
When using animations in combination with a @HostBinding dom nodes are not released.
Angular version: 5.2.10
Browser:
- [x ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
Reacted by Максим Иванов, TG, Michael Oberwasserlechner, Adrian Tavares, darkrocks, worthy7, Liad Idan, epictecch and Moshe Yamini
This example also shows a work-around that will eliminate the leak by adding a no-op animation in the parent component.
Note that this issue is also the root cause of a memory leak in Angular Material sidenav component (technically the MatDrawer component) as described in angular/components#8862
Activity
MrHus commentedon May 30, 2018
Possibly related: #18606
splincode commentedon May 31, 2018
@MrHus
Can you add a performance monitor screen? I would like to see gif in order to understand what is wrong and how it affects the application..
MrHus commentedon May 31, 2018
Here's a gif: http://www.giphy.com/gifs/5eEXzHZUyucJ48WqP9
splincode commentedon May 31, 2018
@MrHus Thank you, it's perfect example
g-stone7 commentedon Jun 26, 2018
We discovered similar problems with Angular 4,5 and 6 as well. Any ideas where the leak comes from? When will it be fixed?
jsim5446 commentedon Jun 7, 2020
Here is a repro that demonstrates this bug is still not fixed (or maybe regressed at some point) in Angular 9.1.9:
https://stackblitz.com/edit/angular-ivy-wfjsyc
This example also shows a work-around that will eliminate the leak by adding a no-op animation in the parent component.
Note that this issue is also the root cause of a memory leak in Angular Material sidenav component (technically the MatDrawer component) as described in angular/components#8862
jlgabbar commentedon Feb 3, 2021
Any update on this?
andresbm05 commentedon Oct 5, 2022
Any update on this? I updated the repro @jsim5446 did to Angular 14.2 and the issue still happens https://stackblitz.com/edit/angular-v14-playground-62uxm9
JeanMeche commentedon Jul 3, 2023
@andresbm05 I can confirm this reproduces the leak.
Also we have another issue already open on this.I'll close this one and lets continue tracking in #20585My bad the issue is a bit different.
A minimal repro :
Note: the leak only appears when there is a
:leaveanimation. If there is only a:enterthere is no leak.fix(animations): Ensure elements are removed from the cache after lea…
fix(animations): Ensure elements are removed from the cache after lea…
fix(animations): Ensure elements are removed from the cache after lea…
angular-automatic-lock-bot commentedon Aug 11, 2023
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.
fix(animations): Ensure elements are removed from the cache after lea…
fix(animations): Ensure elements are removed from the cache after lea…