Opened 15 years ago
Closed 15 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]; }
Note: See
TracTickets for help on using
tickets.
(In [9114]) Fixes #3413. Thanks, Bryan for catching this.