jonessieka / explorercanvas

Automatically exported from code.google.com/p/explorercanvas
Apache License 2.0
0 stars 0 forks source link

Memory leak in excanvas #82

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create canvas node under div#ct
2. G_vmlCanvasManager.initElement
3. clear ct: ct.innerHTML = ""
4. the canvas node didn't release(use sIEve)

What is the expected output? What do you see instead?
excanvas should add one method to release canvas, to prevent leak.

What version of the product are you using? On what operating system?
r73

Please provide any additional information below.
// add uninitElement, to complete release canvas node.
// this should call manually before remove.
uninitElement : function(el){
    var ctx = el.getContext();
    delete ctx.element_;
    delete ctx.canvas;
    el.innerHTML = "";
    el.context_ = null;
    el.getContext = null;
    el.detachEvent("onpropertychange", onPropertyChange);
    el.detachEvent("onresize", onResize);
}

Original issue reported on code.google.com by cyrill...@gmail.com on 7 Jul 2010 at 1:24

GoogleCodeExporter commented 9 years ago
I have noticed this problem also. We dynamically create charts using your 
library and we refresh them once a minute. The old nodes aren't getting deleted 
and memory consumption just climbs and climbs .... It is quite a big problem 
for us. 

Original comment by RichieMa...@gmail.com on 16 Jul 2010 at 2:15

GoogleCodeExporter commented 9 years ago
Confirmed. I've created Windows Gadget and used excanvas to draw 4 histograms 
and refresh then once per second. At start windows sidebar have ~200MB. After 
about 12 hours it was 1.5GB(!) and still growing.

Original comment by pohy...@gmail.com on 1 Jan 2014 at 11:09