This is natural and expected.
Browser garbage collection starts asynchronously. Once your actual DOM disconnected the nodes, it does not guarantee that they are heap free. They will remain there until the next garbage collection trigger.
As dev tools # Fix Memory Problems said , don't worry about it and leave it in the garbage collection process.
Please note that leave it in the GC until it affects the performance of your applications. If this really pushes you to a slow browser and hang up the mess, you should really start to profile it and fix it. This could be a potential memory leak.
A DOM node can only be collected by garbage collection, if there are no links to it from the DOM tree of the page or from JavaScript code. A node is called "detached" when it is removed from the DOM tree, but some JavaScript still references it. Individual DOM nodes are a common cause of memory leaks. This section describes how to use DevTools heap profilers to identify individual nodes.
And the fix is ββprovided in the same article using Chrome Dev tools. In short, take pictures of your heap and start looking at individual nodes.

The nodes highlighted in yellow have direct links to them from JavaScript code. Nodes highlighted in red do not have direct links. They are alive only because they are part of the yellow tree node. In general, you want to focus on the yellow nodes. Correct your code so that the yellow node is not alive longer than it should be, and you also get rid of the red nodes that are part of the yellow node tree.
Read more ..
κ±α΄Κα΄κ±Κ α΄α΄α΄α΄
source share