Iframe content is saved in node webkit

I am making an application in Node-Webkit that shows different sites, videos and pictures one after another, where I show images in an image tag, videos in a video tag, and sites in an iframe-tag in an iframe, and I replace it with another one. The problem is that when I look in the hrome dev-tools, the number of Dom Nodes keeps increasing, as does the number of documents. It looks like when I replace the iframe with something else (image or other site) it is not removed from memory (memory also grows over time). Video and image tags do not have these leftovers.

This is a problem because it has to work for a long time and eventually this memory leak will kill the application.

What I am doing is basically this:

HTML:

<div id="content"></div>

      

JS:

document.getElementById("content").innerHTML = "<iframe src='http://www.google.com' />";

      

and later

document.getElementById("content").innerHTML = "<video src='some.video.source' />";

      

but then when I look at the timeline in the nodes that were added when the iframe was inserted are not removed. Can anyone help me with how to clear the iframe (and this content)?

+3


source to share


1 answer


I see the same problem and believe it is caused by this problem: https://bugs.webkit.org/show_bug.cgi?id=31253



0


source







All Articles