Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#9966 closed defect (fixed)

dojoAttachPoints leak

Reported by: bill Owned by: bill
Priority: high Milestone: 1.4
Component: Dijit Version: 1.3.2
Keywords: Cc:
Blocked By: Blocking:


Apparently IE6 is leaking because _Widget.destroy doesn't null out/delete all the attachPoint references like this.containerNode, this.domNode, etc.

Simple enough to add that code.

Change History (8)

comment:1 Changed 12 years ago by bill

Resolution: fixed
Status: newclosed

(In [20248]) Avoid a memory leak on IE6. Fixes #9966 !strict.

comment:2 Changed 12 years ago by Douglas Hays

Priority: normalhigh
Resolution: fixed
Status: closedreopened

IE6 is throwing an exception when destroy() is run after this changeset was committed.
I loaded test_Menu.html in IE6 and pressed the browser's Home Key and an exception is thrown "undefined is null or not an object".

comment:3 Changed 12 years ago by bill

Ah, thanks for the heads up. Looks like submenu2 is getting destroyed when it's parent PopupMenuItem is destroyed, but it's also getting another destroy() call from the loop in manager.js:

	dojo.forEach(dijit.findWidgets(dojo.body()), function(widget){
		}else if(widget.destroy){

It's because every Menu is a child of <body> even though logically submenu2 is a child of another Menu's PopupMenuItem.

Guess I just need to add some flags to prevent double destroys.

comment:4 Changed 12 years ago by bill

(In [20294]) Deleting all attach points was happening too early. Specifically, methods like Combobox.uninitialize() were being called after the delete and trying to reference the deleted attach points. Refs #9966 !strict.

comment:5 Changed 12 years ago by Douglas Hays

Seems OK now. Can this be closed?

comment:6 Changed 12 years ago by bill

Yes, actually closed it before but the comment got lost:

(In [20293]) Avoid double destroy() on widgets like Menu that are logically children of other widgets even though they are attached to <body> and thus picked up as "top level widgets". Fixes #9966 !strict.

comment:7 Changed 12 years ago by bill

Resolution: fixed
Status: reopenedclosed

(In [20312]) Safeguarding against double destroy() on a few more widgets with popups. Fixes #9966 !strict.

comment:8 Changed 12 years ago by bill

(In [21124]) Declare _attachPoints in constructor() rather than buildRendering() so that DTL, which overrides buildRendering(), works again. Problem started in [20248] (refs #9966).

Thanks to ID and danstefan for the fix. Fixes #10612, #10526 !strict.

Note: See TracTickets for help on using tickets.