Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#1737 closed defect (fixed)

FloatingPane destroy does not destroy its resize handle (leak)

Reported by: yh_mailinglist@… Owned by: liucougar
Priority: high Milestone:
Component: Widgets Version: 0.4
Keywords: FloatingPane leak Cc:
Blocked By: Blocking:

Description

After calling destroy on a FloatingPane?, its resizeHandle is not destroyed and can still be accessed from dojo.widget.manager.widgets.

the pb is in function fillInTemplate,

the line

this.resizeBar.appendChild(this.resizeHandle.domNode);

should actually be

this.addChild(this.resizeHandle, this.resizeBar);

pb found in 0.3.1, but it is also present in 0.4

Change History (6)

comment:1 Changed 13 years ago by guest

comment: the fix I have suggested works only with dynamically created floating panes. It breaks floating panes created statically (no resize handle anymore).

comment:2 Changed 13 years ago by yh

I think the proper way to fix the pb is:

destroy: function() {

if (this.resizeHandle){

this.resizeHandle.destroy(); this.resizeHandle = null;

}

return dojo.widget.FloatingPane?.superclass.destroy.call(this);

},

comment:3 Changed 13 years ago by bill

Milestone: 0.4.1
Owner: changed from bill to liucougar

Cougar is going to fix; I don't want to do an addChild() because then the resizeHandle widget will show up in the children[] array, which is not what the user expects. But it should be deleted in the destroy() method.

comment:4 Changed 13 years ago by liucougar

fixed in [6307]

comment:5 Changed 13 years ago by liucougar

Resolution: fixed
Status: newclosed

comment:6 Changed 12 years ago by (none)

Milestone: 0.4.1

Milestone 0.4.1 deleted

Note: See TracTickets for help on using tickets.