Clear pool for a tree reference.
@param treeReference
12560
public void clear(String treeReference){
		Pool<BehaviorTree> treePool = pools.get(treeReference);
		if(treePool != null){
			treePool.clear();
		}
	}
209432
public void clearDereferencedListeners() {
        if (uiThreadRunner.isOnUiThread()) {
            graph.clearDereferencedListeners();
        } else {
            uiThreadRunner.post(new Runnable() {
                @Override
                public void run() {
                    graph.clearDereferencedListeners();
                }
            });
        }
    }
556513
public void reset() {
		Enumeration<TreeNode> children = root.children();
		while (children.hasMoreElements()) {
			removeNodeFromParent((MutableTreeNode) children.nextElement());
			children = root.children();
		}
	}
983694
public void clean()
	{

		ChronoFullRevision cfr = firstCFR;
		totalSize = size;
		while (cfr != null) {
			totalSize += cfr.size();
			cfr = cfr.getNext();
		}

		if (totalSize < MAX_STORAGE_SIZE) {
			return;
		}

		cfr = firstCFR;
		while (cfr != null) {
			totalSize += cfr.clean(revisionIndex, 0);
			cfr = cfr.getNext();
		}

		ChronoStorageBlock block;
		while (last != null && totalSize >= MAX_STORAGE_SIZE) {

			// System.out.println("CLEAN " + last.getRevisionIndex());

			// Retrieve previous block
			block = last.getIndexPrev();

			// Subtract size
			if (storage.remove(last.getRevisionIndex()) == null) {
				throw new RuntimeException("VALUE WAS NOT REMOVED FROM STORAGE");
			}
			totalSize -= last.length();
			size += last.length();

			// Delete references
			if (block != null) {
				block.setIndexNext(null);
			}
			last.setIndexPrev(null);

			cfr = last.getChronoFullRevision();
			totalSize += cfr.size()
					- cfr.clean(revisionIndex, last.getRevisionIndex());

			if (last == first) {
				first = null;
			}

			// Set the new last
			last = block;
		}

		
	}
373741
public void reset()
  {
    releaseDTMXRTreeFrags();
  	// These couldn't be disposed of earlier (see comments in release()); zap them now.
  	if(m_rtfdtm_stack!=null)
  		 for (java.util.Enumeration e = m_rtfdtm_stack.elements() ; e.hasMoreElements() ;) 
  		 	m_dtmManager.release((DTM)e.nextElement(), true);

    m_rtfdtm_stack=null; // drop our references too
    m_which_rtfdtm=-1;
    
    if(m_global_rtfdtm!=null)
  		 	m_dtmManager.release(m_global_rtfdtm,true);
    m_global_rtfdtm=null;
    
  	
    m_dtmManager = DTMManager.newInstance(
                   org.apache.xpath.objects.XMLStringFactoryImpl.getFactory());
                   
    m_saxLocations.removeAllElements();   
	m_axesIteratorStack.removeAllElements();
	m_contextNodeLists.removeAllElements();
	m_currentExpressionNodes.removeAllElements();
	m_currentNodes.removeAllElements();
	m_iteratorRoots.RemoveAllNoClear();
	m_predicatePos.removeAllElements();
	m_predicateRoots.RemoveAllNoClear();
	m_prefixResolvers.removeAllElements();
	
	m_prefixResolvers.push(null);
    m_currentNodes.push(DTM.NULL);
    m_currentExpressionNodes.push(DTM.NULL);
    m_saxLocations.push(null);
  }
1231369
public function clear()
    {
        $this->id = null;
        $this->code = null;
        $this->en = null;
        $this->de = null;
        $this->alreadyInSave = false;
        $this->alreadyInValidation = false;
        $this->alreadyInClearAllReferencesDeep = false;
        $this->clearAllReferences();
        $this->applyDefaultValues();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
146580
public boolean removeReference(ServiceReference<T> reference) {
        synchronized (elementMap) {
            ConcurrentServiceReferenceElement<T> element = elementMap.remove(reference);
            if (element == null) {
                return false;
            }

            elementSet.remove(element);
            return true;
        }
    }
1119301
public synchronized void clear() {

        // remove all objects from the linked list from the tail to the head:
        I_CmsLruCacheObject currentObject = m_listTail;
        while (currentObject != null) {
            currentObject = currentObject.getNextLruObject();
            removeTail();
        }

        // reset the data structure
        m_objectCosts = 0;
        m_objectCount = 0;
        m_listHead = null;
        m_listTail = null;
    }
1164240
public void cleanUpNullReferences() {
        synchronized (map) {
            final Iterator<Map.Entry<K, V>> iterator = map.entrySet().iterator();
            while (iterator.hasNext()) {
                final Map.Entry<K, V> entry = iterator.next();
                final Object value = entry.getValue();

                if (!(value instanceof SoftReference)) continue;
                if (((SoftReference) value).get() == null) iterator.remove();
            }
        }
    }
621274
@Override
    public void clear() {
        _rows = 0;
        Arrays.fill(_value, null);
        Arrays.fill(_tree, (char) 0);
        Arrays.fill(_key, null);
    }
725917
public void clear() {
        // Clearing all of the links between nodes is "unnecessary", but:
        // - helps a generational GC if the discarded nodes inhabit
        //   more than one generation
        // - is sure to free memory even if there is a reachable Iterator
        for (Node<E> x = first; x != null; ) {
            Node<E> next = x.next;
            x.item = null;
            x.next = null;
            x.prev = null;
            x = next;
        }
        first = last = null;
        size = 0;
        modCount++;
    }
1328225
public void removeAllConversations(Object connectionReference) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "removeAllConversations", connectionReference);

        final ArrayList list;
        synchronized (activeConversations) {
            list = (ArrayList) activeConversations.remove(connectionReference);
        }

        // Remove the connection reference from the list
        if (list != null) {
            try {
                for (int x = 0; x < list.size(); x++) {
                    Conversation conv = (Conversation) list.get(x);
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                        SibTr.debug(this, tc, "Found a Conversation in the table: ", conv);
                    // Now call the server transport receive listener to clean up the resources
                    serverTransportReceiveListener.cleanupConnection(conv);
                }
            } catch (Throwable t) {
                FFDCFilter.processException(t, CLASS_NAME + ".removeAllConversations",
                                            CommsConstants.SERVERTRANSPORTACCEPTLISTENER_REMOVEALL_01,
                                            this);

                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    SibTr.debug(this, tc, "Caught an exception cleaning up a connection", t);
            }

            // Now clear the list
            list.clear();
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "removeAllConversations");
    }
863917
public void setHistoryReference(HistoryReference historyReference) {
    	
        if (getHistoryReference() != null) {
//            if (getHistoryReference().getHistoryType() == HistoryReference.TYPE_SPIDER) {
//                getHistoryReference().delete();
//                getHistoryReference().setSiteNode(null);
//            } else if (!getPastHistoryReference().contains(historyReference)) {
//                getPastHistoryReference().add(getHistoryReference());
//            }
            
        	if (this.justSpidered && (historyReference.getHistoryType() == HistoryReference.TYPE_PROXIED ||
        	        historyReference.getHistoryType() == HistoryReference.TYPE_ZAP_USER)) {
        		this.justSpidered = false;
        		this.nodeChanged();
        	}
			// we remove the icons of the node that has to be cleaned when manually visiting them
			if (!this.icons.isEmpty() && (historyReference.getHistoryType() == HistoryReference.TYPE_PROXIED ||
			        historyReference.getHistoryType() == HistoryReference.TYPE_ZAP_USER)) {
		    	synchronized (this.icons) {  
					for (int i = 0; i < this.clearIfManual.size(); ++i) {
						if (this.clearIfManual.get(i) && this.icons.size() > i) {
							this.icons.remove(i);
							this.clearIfManual.remove(i);
						}
					}
		    	}
        		this.nodeChanged();
    		}
            if (HistoryReference.TYPE_SCANNER == historyReference.getHistoryType()) {
                getPastHistoryReference().add(historyReference);
                return;
            }

            // above code commented as to always add all into past reference.  For use in scanner
            if (!getPastHistoryReference().contains(getHistoryReference())) {
                getPastHistoryReference().add(getHistoryReference());
            }
        }
        
        this.historyReference = historyReference;
        this.historyReference.setSiteNode(this);
    }
138237
public void removeService(ServiceReference reference, Object service) {
        if (serviceRegistration != null) {
            serviceRegistration.unregister();
            serviceRegistration = null;
        }

        String alias = this.getAlias();
        ((HttpService) service).unregister(alias);
        if (servlet instanceof WebappServlet)
            ((WebappServlet)servlet).free();
        servlet = null;
    }
1133617
protected synchronized void clear()
                    throws ObjectManagerException {
        final String methodName = "clear";
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this, cclass, methodName);

        // No call to super.clear() because we use a WeakValueHashMap.
        inMemoryTokens.clear();
        cachedManagedObjects = new java.lang.ref.SoftReference[cachedManagedObjectsSize];
        managedObjectsToWrite.clear();
        tokensToDelete.clear();
        // No need to clear newFreeSpace because the existing one is cleared just before we flush anyway.

        // Allow for two headers to be written at the front of the file.
        storeFileSizeUsed = pageSize * 2;
        freeSpaceByAddressHead = null;
        freeSpaceByLength = new java.util.TreeSet(new LengthComparator());
        freeSpaceStoreArea = null;

        // Sequence numbers 0-200 are reserved.    
        sequenceNumber = initialSequenceNumber;

        directory = makeDirectory(initialDirectoryMinimumNodeSize, 0, 0);
        directoryReservedSize = directory.spaceRequired();
        reservedSize.set(0);
        setAllocationAllowed();

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass, methodName);
    }
816105
private boolean cleanUp(Reference<?> reference) {
    Method finalizeReferentMethod = getFinalizeReferentMethod();
    if (finalizeReferentMethod == null) {
      return false;
    }
    do {
      /*
       * This is for the benefit of phantom references. Weak and soft
       * references will have already been cleared by this point.
       */
      reference.clear();

      if (reference == frqReference) {
        /*
         * The client no longer has a reference to the
         * FinalizableReferenceQueue. We can stop.
         */
        return false;
      }

      try {
        finalizeReferentMethod.invoke(reference);
      } catch (Throwable t) {
        logger.log(Level.SEVERE, "Error cleaning up after reference.", t);
      }

      /*
       * Loop as long as we have references available so as not to waste
       * CPU looking up the Method over and over again.
       */
    } while ((reference = queue.poll()) != null);
    return true;
  }
1213455
public void clear(PhantomReference<T> reference) {
        Optional.ofNullable(registeredMap.remove(reference)).ifPresent(a -> reference.clear());
    }