ionicons icon indicating copy to clipboard operation
ionicons copied to clipboard

bug: Memory Leak with Clusterize.js "Detached Elements"

Open viniciuscenci opened this issue 2 years ago • 0 comments

Current Behavior

When using clusterize.js + ionicons module, ionicons keeps references in memory, the list of "Detached Elements" keeps growing.

Expected Behavior

Elements to be Garbage Collected.

Steps to Reproduce

  1. Create a instance of Clusterize.js with 1000 items, using the tag <ion-icon name="arrow-forward-circle-outline"></ion-icon>

image

  1. Filter the list using the button image Or even just by scrolling the list...

  2. Check the "Detached Elements" (in Edge) or in Chrome

image

Code Reproduction URL

https://codepen.io/viniciuscenci/pen/RwvvrGL

Additional Information

In the provided code, by replacing the <ion-icon> tag with regular <svg> or svg references, the problem is solved, but the convenience of <ion-icon> tag is lost =(

image

[!NOTE] It get event worst when there is multiple icons, divs and other elements inside de list item, since the number of detached nodes is basically multiplied.

viniciuscenci avatar Dec 06 '23 18:12 viniciuscenci