Called when the View was registered

        Can be used e.g. to connect signals. Here, the destroy signal is connected to close the application
5337
def register_view(self, view):
        
        super(StateOutcomesEditorController, self).register_view(view)
        if isinstance(view, StateOutcomesEditorView):
            self.connect_signal(view['add_button'], "clicked", self.oc_list_ctrl.on_add)
            self.connect_signal(view['remove_button'], "clicked", self.oc_list_ctrl.on_remove)

            if isinstance(self.model.state, LibraryState) or self.model.state.get_next_upper_library_root_state():
                view['add_button'].set_sensitive(False)
                view['remove_button'].set_sensitive(False)
622100
public void close() {
        if (mIsVisible) {
            mIsVisible = false;
            ((ViewGroup) mView.getParent()).removeView(mView);
            onClose();
        }
    }
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);
        }
    }
1042857
protected void physicalCloseNotification() {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "physicalCloseNotification");
      synchronized(connectionClosedLock) {
         connectionClosed = true;
      }
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "physicalCloseNotification");
   }
1273482
public void onDetach() {
        close();
        if (mView != null)
            mView.setTag(null);
        mView = null;
        mMapView = null;
        if (Configuration.getInstance().isDebugMode())
            Log.d(IMapView.LOGTAG, "Marked detached");
    }
565589
void close() {

        final String methodName = "close";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, methodName);
        }

        /*
         * Cancel any ongoing dispatch
         */
        _cancelled = true;

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, methodName);
        }

    }
1182404
public void destroy() {
        if (mIsClosed) {
            return;
        }
        if (mState != STATE_STOPPED) {
            mDestroyDelayed = true;
            return;
        }
        mIsClosed = true;

        PlaybackService.unregisterListener(getContext(), mInternalListener);
        mInternalListener = null;

        mApplicationContext.clear();
        mApplicationContext = null;

        mClientKey = null;
        mPlayerPlaylist = null;
        mCheerleaderPlayerListeners.clear();
    }
1359281
public void onCloseRemote(CloseInfo closeInfo) {
        if (LOG.isDebugEnabled())
            LOG.debug("onCloseRemote({})", closeInfo);
        ConnectionState event = null;
        synchronized (this) {
            if (this.state == ConnectionState.CLOSED) {
                // already closed
                return;
            }

            if (LOG.isDebugEnabled())
                LOG.debug("onCloseRemote(), input={}, output={}", inputAvailable, outputAvailable);

            this.closeInfo = closeInfo;

            // turn off further input
            inputAvailable = false;

            if (closeHandshakeSource == CloseHandshakeSource.NONE) {
                closeHandshakeSource = CloseHandshakeSource.REMOTE;
            }

            if (!outputAvailable) {
                LOG.debug("Close Handshake satisfied, disconnecting");
                cleanClose = true;
                state = ConnectionState.CLOSED;
                finalClose.compareAndSet(null, closeInfo);
                event = this.state;
            } else if (this.state == ConnectionState.OPEN) {
                // We are now entering CLOSING (or half-closed)
                this.state = ConnectionState.CLOSING;
                event = this.state;
            }
        }

        // Only notify on state change events
        if (event != null) {
            notifyStateListeners(event);
        }
    }
1227406
def destroy
      app_instance = MnoEnterprise::AppInstance.find(params[:id])

      if app_instance
        MnoEnterprise::EventLogger.info('app_destroy', current_user.id, 'App destroyed', app_instance)
        app_instance.terminate
      end

      head :accepted
    end
281747
void unregistered() {
        try {
            if (!m_alreadyStopped) {
                m_alreadyStopped = true;
                try {
                    m_handler.stopped(this);
                } finally {
                    try {
                        m_writeStream.shutdown();
                    } finally {
                        if (m_readStream != null) {
                            m_readStream.shutdown();
                        }
                    }
                }
            }
        } finally {
            networkLog.debug("Closing channel " + m_toString);
            try {
                m_channel.close();
            } catch (IOException e) {
                networkLog.warn(e);
            }
        }
    }
111513
def closeView(self, view=None):
        
        if type(view) == int:
            view = self.widget(view)
        elif view == None:
            view = self.currentView()
        
        index = self.indexOf(view)
        if index == -1:
            return False
        
        # close the view
        count = self.count()
        if count == 1:
            self.closePanel()
        else:
            view.close()

        return True
1330542
def _idle_register_view(self, view):
        """"""
        assert(self.view is None)
        self.view = view

        if self.handlers == "class":
            for name in dir(self):
                when, _, what = partition(name, '_')
                widget, _, signal = partition(what, '__')
                if when == "on":
                    try:
                        view[widget].connect(signal, getattr(self, name))
                    except IndexError:
                        # Not a handler
                        pass
                    except KeyError:
                        logger.warn("Widget not found for handler: %s", name)
        elif self.handlers == "glade":
            self.__autoconnect_signals()
        else:
            raise NotImplementedError("%s is not a valid source of signal "
                "connections" % self.handlers)

        self.register_view(view)
        self.register_adapters()
        if self.__auto_adapt: self.adapt()
        return False
789517
public void onDestroy() {
    stopNavigation();
    removeOffRouteListener(null);
    removeProgressChangeListener(null);
    removeMilestoneEventListener(null);
    removeNavigationEventListener(null);
    removeFasterRouteListener(null);
    removeRawLocationListener(null);
  }
377029
function executeOnDestroys(view) {
    var tView = view[TVIEW];
    var destroyHooks;
    if (tView != null && (destroyHooks = tView.destroyHooks) != null) {
        callHooks(view[DIRECTIVES], destroyHooks);
    }
}
1242245
function exitFullScreen() {
    if (Windows.UI.ViewManagement.ApplicationViewBoundsMode) { // else crash on 8.1
        var view = Windows.UI.ViewManagement.ApplicationView.getForCurrentView();
        view.setDesiredBoundsMode(Windows.UI.ViewManagement.ApplicationViewBoundsMode.useVisible);
        view.suppressSystemOverlays = false;
    }
}
997500
def destroy(self):
        
        if self.client:
            #: Stop listening
            self.client.setWebView(self.widget, None)
            del self.client
        super(AndroidWebView, self).destroy()
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 */;
}