Opened 15 years ago

Closed 15 years ago

#4144 closed defect (fixed)

dijit.Menu causes memory leak in IE

Reported by: guest Owned by: sjmiles
Priority: high Milestone: 1.0
Component: Dijit Version: 0.9
Keywords: Cc:
Blocked By: Blocking:


dijit.Menu bindDomNode method stores disconnect handles on the node to witch the menu is bound. These handles contain a reference to the node itself. If a node contains a reference to itself, this will prevent IE (including IE7) from garbage collecting the node.

The leak resulting from this is visible by: 1. loading the dijit/tests/test_Tree.html test in sIEve, 2. click about: blank and click Show Leaks. Recommend storing the disconnect handles in an array in the widget and storing an index into that array on the bound node.

Change History (6)

comment:1 Changed 15 years ago by sjmiles

Owner: changed from anonymous to sjmiles

comment:2 Changed 15 years ago by sjmiles

Status: newassigned

comment:3 Changed 15 years ago by bill

Milestone: 1.0

I agree, the disconnect handles should be stored in dijit.Menu, either keyed by the node or the node's id. id sounds safer except that some nodes don't have an id, but I guess we could generate one.

comment:4 Changed 15 years ago by bill

Component: GeneralDijit

PS: If #4142 then this is no longer an issue.

comment:5 Changed 15 years ago by sjmiles

For clarity, #4142 and #4144 actually cover two separate issues.

#4142 involves indirecting the listener object from the disconnect package, but it's not so easy to indirect the node itself at the connect level, which is why this ticket exists.

comment:6 Changed 15 years ago by sjmiles

Resolution: fixed
Status: assignedclosed

(In [10190]) Indirect disconnect handles from nodes, fixes #4144.

Note: See TracTickets for help on using tickets.