Get detached DOM elements to investigate memory leaks
Edge has a tool just for this: the Detached Elements panel. To use it:
- Open the command menu and type "detached" to find and open the Detached Elements tool.
- Click the Get detached elements button to list all of the currently detached elements.
- Don't forget to click the Collect garbage button every once in a while to force garbage collection. Then get the detached elements again. Indeed, some elements may remain in memory simply because the browser hasn't yet cleaned them up. Forcing GC makes sure the list only contains the elements that are detached and cannot be cleaned up.