Opened 13 years ago

Closed 13 years ago

#3413 closed defect (fixed)

Dijit not cleaning up after itself

Reported by: Bryan Forbes Owned by: bill
Priority: high Milestone: 0.9
Component: Dijit Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

When you call destroy() or destroyRecursive() on a widget, it calls dijit.util.manager.remove on its id to free up memory, but the code isn't really removing the widget from the registry. As a test, open a dijit test, destroy one of the widgets and try running dijit.byId("widgets_id"). The problem is the code for dijit.util.manager.remove:

	this.remove = function(id){
		// summary
		//	Removes a widget from the registry by id, but does not destroy the widget

		delete registry.id;
	}

This should be:

	this.remove = function(id){
		// summary
		//	Removes a widget from the registry by id, but does not destroy the widget

		delete registry[id];
	}

Change History (1)

comment:1 Changed 13 years ago by Adam Peller

Resolution: fixed
Status: newclosed

(In [9114]) Fixes #3413. Thanks, Bryan for catching this.

Note: See TracTickets for help on using tickets.