@SuppressWarnings("unchecked")
	private void processQueue() {
		KeyedSoftReference<T> ref;
		while ((ref = (KeyedSoftReference<T>) refQueue.poll()) != null) {
			long key = ref.getKey();
			KeyedSoftReference<T> oldValue = map.remove(key);

			if (oldValue != null && oldValue != ref) {
				// we have put another item in the cache with the same key.  Further, we
				// removed the item, but the garbage collector had not put the item on the
				// reference queue until after we added a new reference to the cache.
				// We want to keep the last value that was added, as it has not been deleted.
				map.put(key, oldValue);
			}
		}
	}
Removes the object with the given key from the cache.
@param key the key of the object to remove.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/DBObjectCache.java