Opened 11 years ago

Closed 11 years ago

#7206 closed defect (fixed)

[patch] [cla] TabContainer: closable tab pane leaks dom nodes when closed.

Reported by: afryer Owned by: bill
Priority: high Milestone: 1.2
Component: Dijit Version: 1.1.1
Keywords: dom node leak TabContainer StackContainer addChild closable Cc:
Blocked By: Blocking:

Description

When a closable tab pane is created, it instantiates a menu and a menu item. When the tab pane is closed, the menu is destroyed using the destroy() method. The menuItem is not destroyed and is leaked.

I also see dojo.connect calls made on the button and menu widgets that don't have corresponding dojo.disconnect calls when the tab pane is closed.

Have attached a test case and a patch file to fix the leak.

Attachments (2)

test_TabContainer_Programmatic_leak.html (2.0 KB) - added by afryer 11 years ago.
test demonstrating closable tab pane leak when run in sIEve
StackContainer_patch.txt (2.8 KB) - added by afryer 11 years ago.
patch for StackContainer?.js that fixes closable child leak

Download all attachments as: .zip

Change History (6)

Changed 11 years ago by afryer

test demonstrating closable tab pane leak when run in sIEve

Changed 11 years ago by afryer

Attachment: StackContainer_patch.txt added

patch for StackContainer?.js that fixes closable child leak

comment:1 Changed 11 years ago by bill

Milestone: tbd1.2
Owner: set to bill
Summary: closable tab pane leaks dom nodes when closed.[patch] [cla] TabContainer: closable tab pane leaks dom nodes when closed.

Cool, leak fixes always appreciated! BTW if your attachments have a .patch or .diff extension they show up formatted nicely, see for example http://bugs.dojotoolkit.org/attachment/ticket/5417/5417.patch

comment:2 Changed 11 years ago by bill

Which version is your patch against? I tried it against the 1.1.1 StackContainer?.js [13089] and the latest [14420] but it match up.

comment:3 Changed 11 years ago by bill

Status: newassigned

Of course, above I meant to type "doesn't match up". But looking at the patch again I see it's against [14413], which I guess means [13897] of StackContainer.js. Will check in.

comment:4 Changed 11 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [15036]) Fix leaks. Patch from afryer (CLA on file); thanks! Fixes #7206 !strict.

Note: See TracTickets for help on using tickets.