Opened 12 years ago

Closed 8 years ago

#9343 closed defect (fixed)

[dojox.Chart2D][dojox.gfx] Confirmed memory leak - all browsers

Reported by: randycasburn Owned by: Eugene Lazutkin
Priority: high Milestone: 1.3.2
Component: DojoX GFX Version: 1.3.0
Keywords: Cc:
Blocked By: Blocking:


Hi Eugene,

It seems some but not all of the entities created by these two classes do not get destroyed, removed, nullified, or otherwise expunged from the bowels of the interpreter 'onUnload()'.

The memory leak is real and measurable across three browsers I tested which were IE, FF, and Chrome.

Here is the test:

1)Using your favorite leak analyzer (I used sIEve), load this url:

2)DO NOT roll over any of the "event triggers". You'll notice no orphans or circular references! If you navigate away from the page you WILL NOT be left with any leaks.

3)Navigate back to the test page and rollover the "event triggers" on the charts. This time when you navigate from the page, you'll notice the leaks.

This leads me to believe the event generator in dojox.Chart2D is causing the problem. I attempted to correct this problem by patching the connectToPlot() method as follows:

this.stackconnections = []; this was initialized with others above

connectToPlot: function(name, object, method){
  return name in this.plots ? this.stackconnections[name] = this.stack[this.plots[name]].connect(object, method) : null;

and by adding a disconnect reference to the destroy method for the class thus:

dojo.forEach(this.stackconnections, function(con){dojo.disconnect(con);});

Clearly my analysis was incorrect as this patch has no effect on this problem. If you have any other insight, I don't mind helping you trouble shoot this problem as this is quite troubling.

thanks for taking a look into this.



Change History (6)

comment:1 Changed 12 years ago by Eugene Lazutkin

Milestone: tbdfuture
Status: newassigned

It may be a general problem, not specific to charts.

comment:2 Changed 11 years ago by JayZ(zhouxiang)

Besides, if we use shape.disconnect instead of dojo.disconnect, the problem still exists(still cause memory leak).

e.g. var k = shape.connect("onmouseover", this, function(e){


}); shape.disconnect(k);

comment:3 Changed 10 years ago by ben hockey

i was playing with sieve and wanted to see what open tickets we had which referenced sieve. i came across this ticket and it looks like this problem went away in dojo 1.3.2 (it still existed in 1.3.1). was wondering if this ticket could be closed?

comment:4 Changed 10 years ago by Eugene Lazutkin

Priority: highnormal
severity: majornormal

Let's wait for a week, if there is a different evidence, and close it.

comment:5 Changed 8 years ago by cjolif

I think the week delay is more than over :) Shall this be closed?

comment:6 Changed 8 years ago by bill

Milestone: future1.3.2
Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.