Opened 11 years ago

Closed 11 years ago

#7968 closed defect (fixed)

dijit.Editor: Memory leak when destroyed

Reported by: Snowman Owned by: bill
Priority: high Milestone: 1.3
Component: Dijit Version: 1.2.0
Keywords: dijit editor destroy destroyrecursive toolbar memory leak Cc: dojo@…
Blocked By: Blocking:

Description

If you create a dijit.Editor and destroy it using "destroyRecursive", not all the child widgets are destroyed. Sample HTML file is attached to demonstrate the problem.

The problem seems to be in the method dijit.Editor.destroy: It calls "this.toolbar.destroy()", but it should probably be calling "this.toolbar.destroyRecursive()". Making this change seems to fix the problem.

Attachments (2)

editormemoryleak.html (851 bytes) - added by Snowman 11 years ago.
Sample HTML file to demonstrate editor memory leak.
7968.diff (679 bytes) - added by ben hockey 11 years ago.
after talking with phiggins and tk, toolbar should destroy it's children through destroy()

Download all attachments as: .zip

Change History (5)

Changed 11 years ago by Snowman

Attachment: editormemoryleak.html added

Sample HTML file to demonstrate editor memory leak.

comment:1 Changed 11 years ago by Snowman

Environment:

OS: Windows XP SP3 Browser: Firefox 2.0.0.17 with Firebug 1.3.0b2

Seems to be a pure DOJO issue though, so problem probably exists in every environment.

Changed 11 years ago by ben hockey

Attachment: 7968.diff added

after talking with phiggins and tk, toolbar should destroy it's children through destroy()

comment:2 Changed 11 years ago by bill

Milestone: tbd1.3
Owner: set to bill
Status: newassigned

For now I don't want to change the behavior of Toolbar.destroy(); that would be inconsistent with other widgets (like BorderContainer.destroy()'s behavior, etc.). That will be addressed in 2.0 though as per #5796.

However, I will change Editor to call Toolbar.destroyRecursive().

comment:3 Changed 11 years ago by bill

Resolution: fixed
Status: assignedclosed

Fixed in [15605].

Note: See TracTickets for help on using tickets.