dojo.forEach(this._plugins, function(p){ if(p && p.destroy){ p.destroy(); } }); this._plugins=[]; this.toolbar.destroy(); delete this.toolbar; this.inherited(arguments);