Clean up.

@param <D>      the type parameter
@param destroys the destroys
197049
@SafeVarargs
    public static <D extends DestroyInterface> void cleanUp(D... destroys) {
        JMOptional.getOptional(destroys).map(Arrays::asList)
                .ifPresent(Destroyer::cleanUp);
    }
747576
public function cleanup(): void
    {
        foreach ($this->getStore() as $key => $value)
        {
            $this->remove($key);
        }
    }
800885
@Override
    public void deleteAll(final Collection<T> values) {
        if (values == null || values.size() == 0) {
            return;
        }

        // we need a List of values to partition
        final List<T> valuesList;
        if (values instanceof List) {
            valuesList = (List<T>) values;
        } else {
            valuesList = Lists.newArrayList(values);
        }

        // process values in groups of <partition size>
        for (final List<T> partition : Lists.partition(valuesList, config.getPartitionSize())) {
            doDeleteAllValues(partition);
            for (final T value : partition) {
                notifyDeleted(value);
            }
        }
    }
114335
private void delete(File file) {
		if (file.isDirectory()) {
			File[] children = file.listFiles();
			for (File child : children) {
				delete(child);
			}
		}
		if (!file.delete()) {
			if (!file.isDirectory()) {
				logger.warn("Unable to clean/delete file: {}", file);
			} else {
				logger.debug("Unable to clean/delete directory: {}", file);
			}
		}
	}
111565
public void destroy() {
        this.poiMatchingCache.clear();
        this.wayMatchingCache.clear();
        for (Rule r : this.rulesList) {
            r.destroy();
        }
    }
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;
    }
1235714
private void dispose(Collection<?> elements) {
        // Dispose all disposable elements
        for (Object element : elements) {
            if (element instanceof Disposable) {
                ((Disposable) element).dispose();
            }
        }

        // Clear collection
        dataProviders.clear();
    }
842168
private void cleanup() {
        Entry<K, V>[] tab = this.table;

        for (int i = tab.length ; i-- > 0 ;) {
            for (Entry<K, V> e = tab[i], prev = null; e != null; e = e.next) {
                if (e.get() == null) {
                    // Clean up after a cleared Reference.
                    this.modCount++;
                    if (prev != null) {
                        prev.next = e.next;
                    } else {
                        tab[i] = e.next;
                    }
                    this.count--;
                } else {
                    prev = e;
                }
            }
        }
    }
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();
    }
508619
public void destroy()
    {
        Iterator iter = _filterMap.values().iterator();
        while (iter.hasNext())
        {
            Object sh=iter.next();
            iter.remove();
            removeComponent(sh);
        }
    }
638209
public void cleanup() {
		long currentTime = System.currentTimeMillis();

		// remove entries which have exceeded their time to live
		cachedExecutionGraphs.values().removeIf(
			(ExecutionGraphEntry entry) -> currentTime >= entry.getTTL());
	}
738062
public void cleanUpContainers() {

        List<String> removed = new ArrayList<String>();
        for (Entry<String, CmsContainerPageContainer> entry : m_targetContainers.entrySet()) {
            if (!RootPanel.getBodyElement().isOrHasChild(entry.getValue().getElement())) {
                removed.add(entry.getKey());
            }
        }
        for (String containerId : removed) {
            m_targetContainers.remove(containerId);
            m_containers.remove(containerId);
        }
        if (removed.size() > 0) {
            scheduleGalleryUpdate();
        }
    }
617153
public void clear() {
    ArrayList<Entry<K, V>> oldExclusives;
    ArrayList<Entry<K, V>> oldEntries;
    synchronized (this) {
      oldExclusives = mExclusiveEntries.clear();
      oldEntries = mCachedEntries.clear();
      makeOrphans(oldEntries);
    }
    maybeClose(oldEntries);
    maybeNotifyExclusiveEntryRemoval(oldExclusives);
    maybeUpdateCacheParams();
  }
768283
private void cleanUp(final DataSet ds) {
		Set<String> indexedKeys = Sets.newHashSet();
		for (String key : ds.getDataView().keySet()) {
			// Search for indexed entries
			if (key.contains("#")) {
				// Remember key (without index)
				indexedKeys.add(key.substring(0, key.indexOf("#")));
			}
		}
		// Remove all indexes
		for (String indexedKey : indexedKeys) {
			ds.removeValue(indexedKey);
		}
	}
1023087
public void destroy() {
		// Synchronize, in case multiCadiFilters are used.
		synchronized(CadiHTTPManip.noAdditional) {
			if(--count<=0 && httpChecker!=null) {
				httpChecker.destroy();
				httpChecker=null;
				access=null;
				pathExceptions=null;
			}
		}
	}
812184
public function __destroy()
    {
        if (!$this->getStack()->isEmpty()) {
            if ($error = error_get_last()) {
                if ($error['type'] === E_ERROR || $error['type'] === E_PARSE || $error['type'] === E_COMPILE_ERROR) {
                    while (@ob_get_clean());
                    $this->handleError($error['type'], $error['message'], $error['file'], $error['line']);
                }
            }
        }
    }
402586
protected void cleanup(Iterable<? extends K> keys, StoreAccessException from) {
    try {
      store.obliterate(keys);
    } catch (StoreAccessException e) {
      inconsistent(keys, from, e);
      return;
    }
    recovered(keys, from);
  }