src/js/libs/spiritual-gui.js
function(plugins, nuke) {
		if (nuke) {
			plugins.forEach(function(plugin) {
				this.$nukeallofit(plugin);
			}, this);
		} else {
			plugins.map(function(plugin) {
				plugin.ondestruct();
				return plugin;
			}).forEach(function(plugin) {
				plugin.$ondestruct();
			});
		}
	}
function(plugins, nuke) {
		if (nuke) {
			plugins.forEach(function(plugin) {
				this.$nukeallofit(plugin);
			}, this);
		} else {
			plugins.map(function(plugin) {
				plugin.ondestruct();
				return plugin;
			}).forEach(function(plugin) {
				plugin.$ondestruct();
			});
		}
	}
function ( plugins , nuke ) { if ( nuke ) { plugins . forEach ( function ( plugin ) { this . $nukeallofit ( plugin ) ; } , this ) ; } else { plugins . map ( function ( plugin ) { plugin . ondestruct ( ) ; return plugin ; } ) . forEach ( function ( plugin ) { plugin . $ondestruct ( ) ; } ) ; } }
Nuke plugins in three steps to minimize access violations.
@param {gui.Spirit} spirit
@param {Array<String>} prefixes
@param {boolean} nuke
Nuke plugins in three steps to minimize access violations .