Overridable method called when a view is unloaded (either on view change or on application shutdown).
        Handles by default the unregistering of all event handlers previously registered by
        the view.
356393
def unload(self):
        
        self.is_loaded = False
        for evt in self._event_cache:
            self.context.unregister(
                evt['event'], evt['callback'], evt['selector'])
        self._event_cache = {}
1207616
void unregisterEventBuses() {
        if (eventsRegistered) {
            eventBusV.unregister(androidComponent);
            eventsRegistered = false;
            logger.trace("-Event2V bus unregistered for view - '{}' and its controllers.",
                    androidComponent.getClass().getSimpleName());
            Mvc.graph().release(this);
        } else {
            logger.trace("!Event2V bus already unregistered for view - '{}'.",
                    androidComponent.getClass().getSimpleName());
        }
    }
506083
@Override
    public void onDestroyView() {
        mHandler.removeCallbacks(mRequestFocus);
        mGridView = null;
        mGridShown = false;
        mEmptyView = mProgressContainer = mGridContainer = null;
        mStandardEmptyView = null;
        super.onDestroyView();
    }
1301210
@Override
    public void onApplicationEvent(@Nonnull ApplicationEvent event) {
        if (event instanceof ContextRefreshedEvent) {
            synchronized (this) {
                ApplicationContext applicationContext = ((ContextRefreshedEvent) event).getApplicationContext();
                setApplicationContext(new WebApplicationContextAdapter(applicationContext, this.servletConfig.getServletContext()));

                // Configure the MVC infrastructure
                configureMultipartResolver();
                configureExceptionResolvers();
                configureHandlerAdapters();
                registerCustomArgumentResolvers();
                configureHandlerMappings();
                addNebaViewResolver();

                // Picks up the previously registered MVC infrastructure
                onRefresh(applicationContext);

                this.initialized = true;
            }
        }
    }
299267
public void onApplicationEvent(ApplicationEvent event)
    {
        if ((event instanceof LoginEvent)
                && (event.getSource() != LoginEvent.NO_AUTHENTICATION))
            handleLoginEvent((LoginEvent) event);
        else if ((event instanceof LogoutEvent))
            handleLogoutEvent((LogoutEvent) event);
    }
809791
private void registerEventHandler() {

        clearEventHandler();
        m_previewRegistration = Event.addNativePreviewHandler(new NativePreviewHandler() {

            @SuppressWarnings("synthetic-access")
            public void onPreviewNativeEvent(NativePreviewEvent event) {

                if (!(m_pointWidget.isAttached())) {
                    clearEventHandler();
                    return;
                }

                NativeEvent nativeEvent = event.getNativeEvent();
                if (nativeEvent == null) {
                    return;
                }
                int eventType = event.getTypeInt();
                switch (eventType) {
                    case Event.ONMOUSEUP:
                        clearEventHandler();
                        save();
                        break;
                    case Event.ONMOUSEMOVE:
                        handleMove(nativeEvent);
                        break;
                    default:
                        break;
                }
            }

        });
    }
894922
@ViewChanged
	public synchronized void onViewChangeEvent(ViewChangedEvent event) {
		
		if (logger.isDebugEnabled()) {
			logger.debug("onViewChangeEvent : pre[" + event.isPre() + "] : event local address[" + event.getCache().getLocalAddress() + "]");
		}
		
		final List<Address> oldView = currentView;
		currentView = new ArrayList<Address>(event.getNewView().getMembers());
		final Address localAddress = getLocalAddress();
		
		//just a precaution, it can be null!
		if (oldView != null) {
			final Cache jbossCache = mobicentsCache.getJBossCache();
			final Configuration config = jbossCache.getConfiguration();		

			final boolean isBuddyReplicationEnabled = config.getBuddyReplicationConfig() != null && config.getBuddyReplicationConfig().isEnabled();
			// recover stuff from lost members
			Runnable runnable = new Runnable() {
				public void run() {
					for (Address oldMember : oldView) {
						if (!currentView.contains(oldMember)) {
							if (logger.isDebugEnabled()) {
								logger.debug("onViewChangeEvent : processing lost member " + oldMember);
							}
							for (FailOverListener localListener : failOverListeners) {
								ClientLocalListenerElector localListenerElector = localListener.getElector();
								if (localListenerElector != null && !isBuddyReplicationEnabled) {
									// going to use the local listener elector instead, which gives results based on data
									performTakeOver(localListener,oldMember,localAddress, true, isBuddyReplicationEnabled);
								}
								else {
									
									List<Address> electionView = getElectionView(oldMember);
									if(electionView!=null && elector.elect(electionView).equals(localAddress))
									{
										performTakeOver(localListener, oldMember, localAddress, false, isBuddyReplicationEnabled);
									}
									
									cleanAfterTakeOver(localListener, oldMember);
								}
							}
						}
					}
				}
			};
			Thread t = new Thread(runnable);
			t.start();
		}
		
	}
642482
function() {
			this._unloaded = true;
			gui.$shutdown();
			dobrodcast(gui.BROADCAST_TOUNLOAD, gui.BROADCAST_ONUNLOAD);
			doaction(gui.ACTION_DOC_UNLOAD, location.href);
		}
173180
function _handleRemoveFromPaneView(e, removedFiles) {
        var handleFileRemoved = function (file) {
            var doc = DocumentManager.getOpenDocumentForPath(file.fullPath);

            if (doc) {
                MainViewManager._destroyEditorIfNotNeeded(doc);
            }
        };

        // when files are removed from a pane then
        //    we should destroy any unnecssary views
        if ($.isArray(removedFiles)) {
            removedFiles.forEach(function (removedFile) {
                handleFileRemoved(removedFile);
            });
        } else {
            handleFileRemoved(removedFiles);
        }
    }
68032
public void disable() {
        enabled = false;

        // It's possible that another uncaught exception handler was installed 'over' us.
        // Whether or not it wrapped us, we have no control over what other classes do, and
        // so we can only remove ourselves if we are still the ('top most') default handler.
        // The 'enabled' boolean exists to ensure we no longer handle uncaught exceptions
        // even in the scenario where we are wrapped.
        Thread.UncaughtExceptionHandler currentHandler = Thread.getDefaultUncaughtExceptionHandler();
        if (currentHandler == this) {
            Thread.setDefaultUncaughtExceptionHandler(defaultExceptionHandler);
        }
    }
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;
			}
		}
403952
function (e) {
                // call unload listeners
                // Keep a local copy of the reference to unloadListeners because it is possible that a listener calls
                // aria.utils.Event.reset (that's what AriaWindow is doing).
                var list = unloadListeners.slice();
                for (var i = 0, len = list.length; i < len; ++i) {
                    var l = list[i];
                    if (l) {
                        l[CB].call(this.getEvent(e));
                        list[i] = null;
                        l = null;
                    }
                }
                list = null;
            }
878714
function () {
    this.system.unregisterMe(this)
    this.unRegisterListeners()
    this.hoverEls.length = 0
    if (this.state.get(this.HOVER_EVENT)) {
      this._unHover(this.state.get(this.HOVER_EVENT))
    }
    this.onGrabEndButton()
    this.onStretchEndButton()
    this.onDragDropEndButton()
  }
940876
@Override
    public void onViewRecycled(RecyclerView.ViewHolder holder) {
        if (mVerbose) Log.v(TAG, "onViewRecycled: " + holder.getItemViewType());
        super.onViewRecycled(holder);
        mOnBindViewHolderListener.unBindViewHolder(holder, holder.getAdapterPosition());
    }
446858
function(view){

    // shut down the child view properly,
    // including events that the collection has from it
    if (view){
      this.stopListening(view);

      // call 'close' or 'remove', depending on which is found
      if (view.close) { view.close(); }
      else if (view.remove) { view.remove(); }

      this.children.remove(view);
    }

    this.triggerMethod("item:removed", view);
  }
101711
function (el, eventType, handler) {
			// workaround for jQuery issue with unbinding custom events:
			// http://forum.jQuery.com/topic/javascript-error-when-unbinding-a-custom-event-using-jQuery-1-4-2
			var func = doc.removeEventListener ? 'removeEventListener' : 'detachEvent';
			if (doc[func] && el && !el[func]) {
				el[func] = function () {};
			}
	
			$(el).unbind(eventType, handler);
		}
1067310
public void unbind() {
        if (itemView == null || controller == null) {
            return;
        }
        if (data != null) {
            this.controller.unmountView(data, itemView);
        }
    }