isic-archive
isic-archive copied to clipboard
Tooltips cause detached DOM elements
Detached DOM elements related to image thumbnails and histograms remain in memory after browsing away from Lesion Images, e.g. to the front page. Typically we'd expect the app to clean up elements related to destroyed views when navigating to a different top-level route.
A detached DOM element is one referenced by code, but that's not in the DOM tree. These elements can be seen using heap snapshots; see https://developers.google.com/web/tools/chrome-devtools/memory-problems/#discover_detached_dom_tree_memory_leaks_with_heap_snapshots.
This was also seen in the Girder web client: https://github.com/girder/girder/issues/1530. The second comment there identifies tooltip event bindings as the cause.
We could check whether it's fixed by https://github.com/twbs/bootstrap/pull/19659, which is in Bootstrap 3.3.7. However, that fix introduced a different error in some cases, as noted in the conversation.