There seems to be a memory leak that occurs when SVG elements are nested inside foreignObject elements. A "garbage collector" was created to fix #241, but I don't think SVG elements within foreignObject elements will ever be removed from the hub object. foreignObjects will not have a ownerSVGElement property defined, so the delete hub[key]; line will never be executed in the garbage collector.
Would replacing this line in the garbage collector:
if (el.type != "svg" && !node.ownerSVGElement || el.type == "svg" && (!node.parentNode || "ownerSVGElement" in node.parentNode && !node.ownerSVGElement))
There seems to be a memory leak that occurs when SVG elements are nested inside foreignObject elements. A "garbage collector" was created to fix #241, but I don't think SVG elements within foreignObject elements will ever be removed from the
hub
object. foreignObjects will not have aownerSVGElement
property defined, so thedelete hub[key];
line will never be executed in the garbage collector.Would replacing this line in the garbage collector:
with
be a suitable solution?