Does the number of extraneous HTMLImageElements increase as you open/use/release Diagrams?
Internally we do have a few DOM elements that we use – for example for measuring text. But the number should not increase even if there are many Diagrams in use simultaneously, nor will they be released if there are no longer any Diagrams at all.
between 2 instances we get like 16 new Detached HTMLImageElement and 8 new Detached SVGGElement… and a lot of other type of detached elements… but these two seem like the only ones that would be related to goJS… (like we get 507 new Detached HTMLDivElement)
couldn’t find any direct link from any of them to goJS tho… looked at the entire retainer tree of one of the images… nothing.
Unless you are asking us to render SVG (e.g. by calling Diagram.makeSvg), GoJS does not create any SVG DOM elements.
Upon a quick review of our code, I believe we create two tiny HTMLImageElements as “static” variables, to which we retain references indefinitely. Of course we may create any number of HTMLImageElements, depending on how many Pictures and URLs your diagram uses.
Wait-- 2.0.2 had a problem with managing SVG DOM elements – try upgrading to latest.