destroys the map view, all references to listeners, all overlays, etc
505311
public void onDetach() {
		this.getOverlayManager().onDetach(this);
		mTileProvider.detach();
		mOldZoomController.setVisible(false);
		if (mZoomController != null) {
			mZoomController.onDetach();
		}

		//https://github.com/osmdroid/osmdroid/issues/390
		if (mTileRequestCompleteHandler instanceof SimpleInvalidationHandler) {
			((SimpleInvalidationHandler) mTileRequestCompleteHandler).destroy();
		}
		mTileRequestCompleteHandler=null;
		if (mProjection!=null)
			mProjection.detach();
		mProjection=null;
		mRepository.onDetach();
		mListners.clear();
	}
574597
function destroy() {
			var stackKey;

			// Remove the events
			removeEvent(axis);

			// Destroy each stack total
			for (stackKey in stacks) {
				destroyObjectProperties(stacks[stackKey]);

				stacks[stackKey] = null;
			}

			// Destroy stack total group
			if (axis.stackTotalGroup) {
				axis.stackTotalGroup = axis.stackTotalGroup.destroy();
			}

			// Destroy collections
			each([ticks, minorTicks, alternateBands, plotLinesAndBands], function (coll) {
				destroyObjectProperties(coll);
			});

			// Destroy local variables
			each([axisLine, axisGroup, gridGroup, axisTitle], function (obj) {
				if (obj) {
					obj.destroy();
				}
			});
			axisLine = axisGroup = gridGroup = axisTitle = null;
		}
1194238
function destroyMap (map) {
    var el = map.getContainer();
    map.remove();
    document.body.removeChild(el);
  }
713822
function destroyEditOverlay() {
  if (overlay) {
    overlay.parentNode.removeChild(overlay);
    overlay = null;
  }

  document.removeEventListener('click', handleDocumentClick);
  document.removeEventListener('keyup', handleDocumentKeyup);
  document.removeEventListener('mousedown', handleDocumentMousedown);
  document.removeEventListener('mousemove', handleDocumentMousemove);
  document.removeEventListener('mouseup', handleDocumentMouseup);
  enableUserSelect();
}
588394
function(){

            var self = this;
            self.pause();

            // notify before
            this.emit('destroy');

            // remove all listeners
            self.off( true );
            // remove everything
            self.remove( self.getBodies() );
            self.remove( self.getBehaviors() );
            self.integrator( null );
            self.renderer( null );
        }
1083913
function destroyLView(view) {
    var renderer = view[RENDERER];
    if (isProceduralRenderer(renderer) && renderer.destroyNode) {
        walkLNodeTree(view[HOST_NODE], view[HOST_NODE], 2 /* Destroy */, renderer);
    }
    destroyViewTree(view);
    // Sets the destroyed flag
    view[FLAGS] |= 32 /* Destroyed */;
}
915315
function () {
        if(this.events) {
            if(this.eventListeners) {
                this.events.un(this.eventListeners);
            }
            this.events.destroy();
            this.events = null;
        }
        this.eventListeners = null;

        // eliminate circular references
        if (this.handler) {
            this.handler.destroy();
            this.handler = null;
        }
        if(this.handlers) {
            for(var key in this.handlers) {
                if(this.handlers.hasOwnProperty(key) &&
                   typeof this.handlers[key].destroy == "function") {
                    this.handlers[key].destroy();
                }
            }
            this.handlers = null;
        }
        if (this.map) {
            this.map.removeControl(this);
            this.map = null;
        }
        this.div = null;
    }
393059
function destroy(){
    
    // Destroy reactive functions.
    reactiveFunctions.forEach(invoke("destroy"));
    if(configurationReactiveFunction){
      configurationReactiveFunction.destroy();
    }
    
    // Destroy properties (removes listeners).
    Object.keys(model).forEach(function (propertyName){
      var property = model[propertyName];
      if(property.destroy){
        property.destroy();
      }
    });

    // Release references.
    reactiveFunctions = undefined;
    configurationReactiveFunction = undefined;
  }
569691
function destroy(self, connections) {
  // Destroy all connections
  connections.forEach(function(c) {
    // Remove all listeners
    for (var i = 0; i < events.length; i++) {
      c.removeAllListeners(events[i]);
    }
    // Destroy connection
    c.destroy();
  });

  // Zero out all connections
  self.inUseConnections = [];
  self.availableConnections = [];
  self.nonAuthenticatedConnections = [];
  self.connectingConnections = [];

  // Set state to destroyed
  stateTransition(self, DESTROYED);
}
102929
function () {
        this.components.length = 0;
        this.components = null;
        OpenLayers.Geometry.prototype.destroy.apply(this, arguments);
    }
892033
function () {
            Overlay.windowResizeEvent.unsubscribe(this.sizeMask, this);
            this.removeMask();
            if (this.close) {
                Event.purgeElement(this.close);
            }
            Panel.superclass.destroy.call(this);  
        }
35030
function()
	{
		this._destroyBinding();

		if(this._collectionBinder) this._collectionBinder.destroyBoundViews();

		this._modelBindersMap = null;
		this._collectionBinder = null;
		this._bindingIndex = null;
		this._itemAlias = null;

		this.element.removeAttribute(settings.DATA_RENDERED_ATTR);
		this.undelegateEvents();
		this.destroySubviews();
		if(this.dispatcher)
		{
			this.dispatcher.off('refresh', this.f('refreshAll'));
			this.dispatcher.off('refreshFromRoot', this.f('refreshFromRoot'));
			this.dispatcher.off('refreshRaf', this.f('requestRefreshAll'));
			this.dispatcher.off('refreshFromRootRaf', this.f('requestRefreshAllFromRoot'));
			this.dispatcher.off('dispatcher:noaction', this.f('_dispatchNoAction'));
		}

		if(this.destroy !== noop) this.destroy();
		if(typeof this.afterDestroy === 'function') this.afterDestroy();

		this._subviewsStruct = null;
		this._explicitSubviewsStruct = null;
		this.subviews = null;
		this._isRunning = false;
		this._isSuspended = false;
	}
487185
function() {
        if (this.map) {
            this.map.events.unregister("buttonclick", this, this.onButtonClick);
        }
        OpenLayers.Control.prototype.destroy.apply(this, arguments);
        for (var ctl, i = this.controls.length - 1; i >= 0; i--) {
            ctl = this.controls[i];
            if (ctl.events) {
                ctl.events.un({
                    activate: this.iconOn,
                    deactivate: this.iconOff
                });
            }
            ctl.panel_div = null;
        }
        this.activeState = null;
    }
134214
public void destroy() {

        m_currentFocus = null;
        if (m_handlerRegistration != null) {
            m_handlerRegistration.removeHandler();
        }
        m_handlerRegistration = null;
        clearInstance();
    }
803951
function() {
			var view = this._view;
			if (view) {
				view.removeEventListener("Destroy", this._listener.onDestroy); //$NON-NLS-0$
				view.removeEventListener("LineStyle", this._listener.onLineStyle); //$NON-NLS-0$
				this.view = null;
			}
			var annotationModel = this._annotationModel;
			if (annotationModel) {
				annotationModel.removeEventListener("Changed", this._listener.onChanged); //$NON-NLS-0$
				annotationModel = null;
			}
		}
486278
void destroy() {
        this.connection.removeListener(streamCloseListener);
        inFlightMessages.clear();
        promisedMessages.clear();
        http2ConnectionManager.removeClientChannel(httpRoute, this);
    }
211467
function () {

		this.popover_manager && this.popover_manager.destroy();
		this.view_manager && this.view_manager.destroy();
		this.app.destroy();
		this.view_manager.destroy();

	}