This method destroys the ApplicationDepot.
341639
public void destroy() {
        for (int j = 0; j < mApplications.length; j++) {
            if (mApplications[j] != null) {
                mApplications[j].destroy();
            }
        }
    }
485508
@Override
    public void destroy()
    {
        indexManager.close();
        if (schemaManager != null)
        {
            schemaManager.dropSchema();
        }
        if (bucket != null)
        {
            LOGGER.info("Closing bucket " + bucket.name() + ".");
            CouchbaseBucketUtils.closeBucket(bucket);
            LOGGER.info("Closed bucket " + bucket.name() + ".");
        }
        if (cluster != null)
        {
            LOGGER.info("Closing connection to couchbase.");
            cluster.disconnect();
            LOGGER.info("Closed connection to couchbase.");
        }
        else
        {
            LOGGER.warn("Can't close connection to Couchbase, it was already disconnected");
        }
        externalProperties = null;
        schemaManager = null;
    }
1066036
@Override
    public void destroy()
    {
        if (indexManager != null)
        {
            indexManager.close();
        }
        if (schemaManager != null)
        {
            schemaManager.dropSchema();
        }
        schemaManager = null;
        externalProperties = null;
        httpClient.getConnectionManager().shutdown();

    }
267414
@Override
    public void destroy(Exception e) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Destroying inbound link: " + this + " " + getVirtualConnection());
        }
        // if this object is not active, then just return out
        synchronized (this) {
            if (!this.bIsActive) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Ignoring destroy on an inactive object");
                }
                return;
            }
            this.bIsActive = false;
        }
        // 291714 - clean up the statemap
        getVirtualConnection().getStateMap().remove(CallbackIDs.CALLBACK_HTTPICL);
        if (getChannel().getHttpConfig().runningOnZOS()) {
            // 363633 - remove the buffer size value if present
            getVirtualConnection().getStateMap().remove(HttpConstants.HTTPReadBufferSize);
        }
        // now clean out any other app connlinks we may have picked up
        if (null != this.appSides) {
            // the super.destroy without an exception just nulls out values
            // the list of appside connlinks includes the current one
            super.destroy();
            for (ConnectionReadyCallback appside : this.appSides) {
                appside.destroy(e);
            }
            this.appSides = null;
        } else {
            // if we only ever got one connlink above, then call the standard
            // destroy to pass the sequence along
            super.destroy(e);
        }
        this.myInterface.clear();
        this.myInterface.destroy();
        // these are no longer pooled, dereference now
        this.myInterface = null;
        this.myTSC = null;
        this.filterExceptions = false;
        this.numRequestsProcessed = 0;
        this.myChannel = null;
    }
1318568
protected void destroy() {
        ContextLogger.LOG.contextCleared(this);
        final BeanStore beanStore = getBeanStore();
        if (beanStore == null) {
            throw ContextLogger.LOG.noBeanStoreAvailable(this);
        }
        for (BeanIdentifier id : beanStore) {
            destroyContextualInstance(beanStore.get(id));
        }
        beanStore.clear();
    }
80903
@Override
  public void destroy()
  {
    Thread thread = Thread.currentThread();
    ClassLoader oldLoader = thread.getContextClassLoader();
    
    try {
      thread.setContextClassLoader(this);
      
      WeakStopListener stopListener = _stopListener;
      _stopListener = null;

      super.destroy();
      
      thread.setContextClassLoader(oldLoader);

      ClassLoader parent = getParent();
      for (; parent != null; parent = parent.getParent()) {
        if (parent instanceof EnvironmentClassLoader) {
          EnvironmentClassLoader loader = (EnvironmentClassLoader) parent;

          loader.removeListener(stopListener);
        }
      }
    } finally {
      thread.setContextClassLoader(oldLoader);
      
      //_owner = null;
      _attributes = null;
      _listeners = null;
      //_scanListeners = null;
      //_stopListener = null;

      /*
      EnvironmentAdmin admin = _admin;
      _admin = null;

      if (admin != null)
        admin.unregister();
        */
    }
  }
620900
public void destroy() {
        DeferredBindingActions.clear();
        if(!disconnected.isEmpty()) {
            disconnected.pop();
        }
        if (getSessionFactory() == null || decNestingCount() > 0 || getParticipate()) {
            return;
        }

        // single session mode
        SessionHolder holder = (SessionHolder) TransactionSynchronizationManager.unbindResource(getSessionFactory());
        LOG.debug("Closing single Hibernate session in GrailsDispatcherServlet");
        try {
            disconnected.clear();
            SessionFactoryUtils.closeSession(holder.getSession());
        }
        catch (RuntimeException ex) {
            LOG.error("Unexpected exception on closing Hibernate Session", ex);
        }
    }
1158166
@Override
    public void destroy() throws Exception {

        String thisMethodName = CLASS_NAME + ".destroy()";

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.entry(tc, thisMethodName, "");
        }

        // Destroy the ME's we created
        Enumeration meEnum = _messagingEngines.elements();

        // Destroy each ME on this server. Any exceptions are caught and
        // deliberately not
        // rethrown as errors in one ME must not affect any others that might
        // exist.
        while (meEnum.hasMoreElements()) {
            Object o = meEnum.nextElement();
            Object c = ((MessagingEngine) o).getRuntime();
            if (c instanceof BaseMessagingEngineImpl) {
                try {
                    ((BaseMessagingEngineImpl) c).destroy();
                    mbeanServiceReg.unregister();
                } catch (Exception e) {
                    FFDCFilter.processException(e, thisMethodName,
                                                "1:910:1.108", this);
                    SibTr.exception(tc, e);
                    SibTr.error(tc, "INTERNAL_ERROR_SIAS0003", e);
                }
            }
        }
        _messagingEngines = null;
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.exit(tc, thisMethodName);
        }
    }
1274438
public void destroy()
    {
        if (_realIn!=null)
            _realIn.destroy();
        _realIn=null;
        _deChunker=null;
        _expectContinues=null;
    }
398400
public final void destroy() throws JMException {
        synchronized (mBeanHandles) {
            List<JMException> exceptions = new ArrayList<JMException>();
            List<MBeanHandle> unregistered = new ArrayList<MBeanHandle>();
            for (MBeanHandle handle : mBeanHandles) {
                try {
                    unregistered.add(handle);
                    handle.server.unregisterMBean(handle.objectName);
                } catch (InstanceNotFoundException e) {
                    exceptions.add(e);
                } catch (MBeanRegistrationException e) {
                    exceptions.add(e);
                }
            }
            // Remove all successfully unregistered handles
            mBeanHandles.removeAll(unregistered);

            // Throw error if any exception occured during unregistration
            if (exceptions.size() == 1) {
                throw exceptions.get(0);
            } else if (exceptions.size() > 1) {
                StringBuilder ret = new StringBuilder();
                for (JMException e : exceptions) {
                    ret.append(e.getMessage()).append(", ");
                }
                throw new JMException(ret.substring(0, ret.length() - 2));
            }
        }

        // Unregister any notification listener
        mBeanServerManager.destroy();
    }
541642
public void destroy() {
        if (sslEngine == null) {
            return;
        }

        // Close inbound and flush all remaining data if available.
        try {
            sslEngine.closeInbound();
        } catch (SSLException e) {
            LOGGER.debug(
                    "Unexpected exception from SSLEngine.closeInbound().", e);
        }


        if (outNetBuffer != null) {
            outNetBuffer.capacity(sslEngine.getSession().getPacketBufferSize());
        } else {
            createOutNetBuffer(0);
        }
        try {
            do {
                outNetBuffer.clear();
            } while (sslEngine.wrap(emptyBuffer.buf(), outNetBuffer.buf()).bytesProduced() > 0);
        } catch (SSLException e) {
            // Ignore.
        } finally {
            destroyOutNetBuffer();
        }

        sslEngine.closeOutbound();
        sslEngine = null;

        preHandshakeEventQueue.clear();
    }
90330
@Override
    public void destroy()
    {
        close();

        URLConnection conn = _conn;
        _conn = null;

        if (conn instanceof HttpURLConnection)
            ((HttpURLConnection) conn).disconnect();
    }
764737
@Override
    public void destroy()
    {
        this.externalProperties = null;
        Object connection = getConnectionPoolOrConnection();

        if (connection != null)
        {
            ((TransportClient) connection).close();

        }
    }
1157417
private void kill(final String applicationId) throws IOException {
    LOG.log(Level.INFO, "Killing application [{0}]", applicationId);
    this.hdInsightInstance.killApplication(applicationId);
  }
203931
public void destroy()
    {
        removeAllListeners();
        if (connectionManager != null)
        {
            if(connectionManager.isInLocalTransaction())
            {
                connectionManager.localRollback();
            }
            connectionManager.releaseConnection();
        }
        this.setClosed(true);

        this.descriptorRepository = null;
        this.pbKey = null;
        this.pbf = null;
        this.connectionManager = null;
        this.dbAccess = null;
        this.objectCache = null;
        this.sequenceManager = null;
        this.sqlGenerator = null;
        this.statementManager = null;
    }
604945
private void shutdown() {
        try {
            this.facade.stop();
            this.facade = null;
            // Destroy the static reference
            destroyInstance();
        } catch (final CoreException e) {
            LOGGER.log(SHUTDOWN_ERROR, e);
        }
    }
997500
def destroy(self):
        
        if self.client:
            #: Stop listening
            self.client.setWebView(self.widget, None)
            del self.client
        super(AndroidWebView, self).destroy()