src/console/simpleyui.js
function(plugin) {
            var ns = plugin, 
                plugins = this._plugins;
    
            if (L.isFunction(plugin)) {
                ns = plugin.NS;
                if (ns && (!plugins[ns] || plugins[ns] !== plugin)) {
                    ns = null;
                }
            }
    
            if (ns) {
                if (this[ns]) {
                    this[ns].destroy();
                    delete this[ns];
                }
                if (plugins[ns]) {
                    delete plugins[ns];
                }
            }
        }
function(plugin) {
            var ns = plugin, 
                plugins = this._plugins;
    
            if (L.isFunction(plugin)) {
                ns = plugin.NS;
                if (ns && (!plugins[ns] || plugins[ns] !== plugin)) {
                    ns = null;
                }
            }
    
            if (ns) {
                if (this[ns]) {
                    this[ns].destroy();
                    delete this[ns];
                }
                if (plugins[ns]) {
                    delete plugins[ns];
                }
            }
        }
function ( plugin ) { var ns = plugin , plugins = this . _plugins ; if ( L . isFunction ( plugin ) ) { ns = plugin . NS ; if ( ns && ( ! plugins [ ns ] || plugins [ ns ] !== plugin ) ) { ns = null ; } } if ( ns ) { if ( this [ ns ] ) { this [ ns ] . destroy ( ) ; delete this [ ns ] ; } if ( plugins [ ns ] ) { delete plugins [ ns ] ; } } }
Unplugs and destroys a plugin already instantiated with the host.

@method _unplug
@private
@param {String | Function} plugin The namespace for the plugin, or a plugin class with the static NS property defined.
Unplugs and destroys a plugin already instantiated with the host .