Skip to content

Dom nodes memory leak with animations using @HostBinding #18606

Closed

Description

@abbazabacto

I'm submitting a...


[x] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] 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

Current behavior

I note while profiling my application that I have detached dom nodes after an animated elements have been removed from dom tree when I am using @HostBinding.

Expected behavior

Detached node should be flushed from memory.

Minimal reproduction of the problem with instructions

I made an example here:
http://plnkr.co/edit/i1kYmhJaeEvV9JGy2DHX?p=preview

I rewrote the plunk from #16239 using @HostBinding. Similar issue still appears, the div elements are still retained.

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

I have some memory crash causes by this on my cordova android mobile application.

Environment


Angular version: 4.3.3

Activity

  1. added
    area: animations
    on Aug 9, 2017
  2. added a commit that references this issue on Sep 1, 2017
    1cc3fe2
  3. harishmegharaj commented on May 20, 2018

    @harishmegharaj

    Can you please share the solution through plunkr? I'm using angular version 4.3.6, but still facing similar problem of memory leak of DOM

  4. angular-automatic-lock-bot commented on Sep 13, 2019

    @angular-automatic-lock-bot

    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.

  5. locked and limited conversation to collaborators on Sep 13, 2019
  6. added a commit that references this issue on Nov 20, 2026
    a8b0942
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: animations

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions