NG-ZORRO / ng-zorro-antd

Angular UI Component Library based on Ant Design
https://ng.ant.design
MIT License
8.86k stars 3.91k forks source link

Memory leak in TreeView #6476

Closed rppig42 closed 3 years ago

rppig42 commented 3 years ago

Reproduction link

https://codesandbox.io/s/exciting-breeze-50lhc?file=/src/app/app.component.ts

Steps to reproduce

  1. click the button for like 20 times
  2. take a memory heap snapshots
  3. search detached in the class filter

What is expected?

  1. just a handful of detached elements

What is actually happening?

  1. you can see thousands of detached elements image
Environment Info
ng-zorro-antd 11.2.0
Browser Chrome latest

Here's something interesting.

With the same code in https://stackblitz.com/edit/angular-l5j6xm, there's no memory leak.

just a guess, the only difference is that stackblitz is not using ivy

rppig42 commented 3 years ago

Duplicated with #6475