/*
(non-Javadoc)

@see com.impetus.kundera.loader.ClientLifeCycleManager#destroy()
167922
@Override
    public void destroy()
    {
        // if(logger.isDebugEnabled())
        logger.info("on close destroying connection pool");

        if (getConnectionPoolOrConnection() != null && getConnectionPoolOrConnection() instanceof JedisPool)
        {
            ((JedisPool) getConnectionPoolOrConnection()).destroy();
        }
        else if (getConnectionPoolOrConnection() != null && getConnectionPoolOrConnection() instanceof Jedis)
        {
            ((Jedis) getConnectionPoolOrConnection()).disconnect();
        }

    }
1184800
@Override
    public void destroy() throws ResourceException {
        LOGGER.debug("Shutting down connection to repo '{0}'", mcf.getRepositoryURL());
        this.session.logout();
        this.handles.clear();
    }
674963
@Override
  public void destroy() {

    ensureParentInitialized();

    // execute Output Mappings (if they exist).
    ensureActivityInitialized();
    if (activity != null && activity.getIoMapping() != null && !skipIoMapping) {
      activity.getIoMapping().executeOutputParameters(this);
    }

    clearExecution();

    super.destroy();

    removeEventSubscriptionsExceptCompensation();
  }
1167353
@Override
    public void destroy() throws Exception {
        final boolean trace = TraceComponent.isAnyTracingEnabled();
        if (trace && tc.isEntryEnabled())
            Tr.entry(this, tc, "destroy", id);

        tracker.close();

        StringBuilder filter = new StringBuilder(FilterUtils.createPropertyFilter(AbstractConnectionFactoryService.ID, id));
        filter.insert(filter.length() - 1, '*');

        builder.removeExistingConfigurations(filter.toString());

        if (trace && tc.isEntryEnabled())
            Tr.exit(this, tc, "destroy");
    }
1237547
private final void _destroy(final Method logFactoryRelease) {
		for (final Iterator it = this.childrenMap.entrySet().iterator(); it
				.hasNext();) {
			final Map.Entry entry = (Map.Entry) it.next();
			final CClassLoader loader = (CClassLoader) entry.getValue();
			loader._destroy(logFactoryRelease);
			it.remove();
		}

		try {
			// remove ref from commons logging
			logFactoryRelease.invoke(null, new Object[] { this });
		} catch (final Exception e) {
		}

		try {
			// reset parent to system class loader
			final Field parent = ClassLoader.class.getDeclaredField("parent");
			parent.setAccessible(true);
			parent.set(this, ClassLoader.getSystemClassLoader());
			parent.setAccessible(false);
		} catch (final Throwable ignore) {
		}

		this.classesMap.clear();
		for (final Iterator it = this.dllMap.entrySet().iterator(); it
				.hasNext();) {
			final Object element = it.next();
			final Map.Entry entry = (Map.Entry) element;
			if (entry.getValue() instanceof File) {
				((File) entry.getValue()).delete();
			}
		}
		this.cacheMap.clear();
		this.dllMap.clear();
		this.resourcesMap.clear();
		this.config = null;
		this.name = null;
		this.finalizepath = this.path;
		this.path = null;
		//classes
		System.runFinalization();
		System.gc();
	}
1289940
@Override
    public void destroy() {
        if (!isDestroyed.compareAndSet(false, true)) {
            return;
        }

        deregisterLifecycleListener();
        for (ICacheInternal cache : caches.values()) {
            cache.destroy();
        }
        caches.clear();

        isClosed.set(true);

        postDestroy();
    }
752661
@Override
    public void destroy() {
        logger.info("Destroying Servlet Filter: {}", PEP.class);
        m_filters = null;
        m_objectsRESTFilterMatcher = null;
        m_ctxHandler = null;
    }
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;
    }
884102
public void destroy() {
        setState(STATE_STOPPED);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(tc, "destroy: " + this);
        }
        this.channelFactory.removeChannel(getName());
        this.channelFactory = null;
        this.myConfig = null;
        this.myObjectFactory = null;
    }
18481
public void destroy()
    {
        Iterator iter = _nameMap.values().iterator();
        while (iter.hasNext())
        {
            Object sh=iter.next();
            iter.remove();
            removeComponent(sh);
        }
        
        if (_sessionManager!=null)
            removeComponent(_sessionManager);
        _sessionManager=null;
        _context=null;
        super.destroy();
    }
469931
public void destroy()
    {   
        for (int i=_fields.size();i-->0;)
        {
            Field field=(Field)_fields.get(i);
            if (field!=null)
                field.destroy();
        }
        _fields=null;
        _index=null;
        _dateBuffer=null;
        _calendar=null;
        _dateReceive=null;
    }
1298638
public void destroy() {

        m_attributeName = null;
        m_attributeType = null;
        m_attributeValueViews.clear();
        m_attributeValueViews = null;
        m_dndHandler = null;
        m_entity = null;
        m_entityType = null;
        m_entityBackEnd = null;
        m_widgetService = null;
    }
1341458
protected void destroy() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "CompletionKey::destroy entered for:" + this);
        }

        // Free existing ByteBuffer objects.
        if (this.rawData != null) {
            if (this.wsByteBuf != null) {
                this.wsByteBuf.release();
                this.wsByteBuf = null;
            }
            this.rawData = null;

            this.stagingByteBuffer = null;
        }
    }
1314621
public void destroy()
    {
        if (isStarted())
            throw new IllegalStateException("Started");

        if (_components!=null && _eventListeners!=null)
        {
            for (int c=0;c<LazyList.size(_components);c++)
            {
                Object o=LazyList.get(_components,c);
                if (o instanceof HttpContext )
                    ((HttpContext)o).destroy();
                
                ComponentEvent event = new ComponentEvent(this,o);
                for(int i=0;i<LazyList.size(_eventListeners);i++)
                {
                    EventListener listener=(EventListener)LazyList.get(_eventListeners,i);
                    if (listener instanceof ComponentListener)
                        ((ComponentListener)listener).removeComponent(event);
                }
            }
        }
        
        _components=null;
        _eventListeners=null;
    }
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;
    }
1085735
public static void destroy() {
		try {
			countMutex.acquire();
			for (int i=0;i<fileToDeleteOnDestroy.size();i++) {
				File f = (File)fileToDeleteOnDestroy.get(i);
				if (f != null && f.exists())
					try{f.delete();}catch(Exception ignore){}
			}
			CClassLoader.destroy();
		} // end try
		finally {
			countInstance = 0;

			try {
				countMutex.release();
			} // end try
			catch (final Exception e) {}
		} // end finally
	}
741077
public void destroy()
    {
        super.destroy();
        if (m_servletTask != null)
            m_servletTask.free();
        m_servletTask = null;
        ServletTask.destroyServlet();
    }