Skip to content

Memory leak with animations in combination with @HostBinding #24197

@MrHus

Description

@MrHus

I'm submitting a...


[ ] 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.

Open https://angular-5-example-tm3ghr.stackblitz.io/bar in chrome and open the performance
monitor. Toggle on "DOM nodes". Note the starting number, now switch between foo and bar a number of times. Now click "Collect garbage" observe that the "DOM nodes" will keep growing.

Expected behavior

That the DOM nodes are garbage collected, and that the DOM nodes do not increase indefinitly.

Minimal reproduction of the problem with instructions

https://stackblitz.com/edit/angular-5-example-tm3ghr?file=app%2Fcontent-state.component.ts

Environment


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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions