Removes all {@link FastThreadLocal} variables bound to the current thread.  This operation is useful when you
are in a container environment, and you don't want to leave the thread local variables in the threads you do not
manage.
979586
public static void removeAll() {
        InternalThreadLocalMap threadLocalMap = InternalThreadLocalMap.getIfSet();
        if (threadLocalMap == null) {
            return;
        }

        try {
            Object v = threadLocalMap.indexedVariable(variablesToRemoveIndex);
            if (v != null && v != InternalThreadLocalMap.UNSET) {
                @SuppressWarnings("unchecked")
                Set<FastThreadLocal<?>> variablesToRemove = (Set<FastThreadLocal<?>>) v;
                FastThreadLocal<?>[] variablesToRemoveArray =
                        variablesToRemove.toArray(new FastThreadLocal[0]);
                for (FastThreadLocal<?> tlv: variablesToRemoveArray) {
                    tlv.remove(threadLocalMap);
                }
            }
        } finally {
            InternalThreadLocalMap.remove();
        }
    }
290745
public void clear()
  {
    _nullValue = NULL;
    
    for (int i = 0; i < _values.length; i++) {
      _keys[i] = null;
      _flags[i] = 0;
      _values[i] = 0;
    }
    
    _size = 0;
  }
1054552
@Override
  public void remove() {
    Assert.state(nextCalled.compareAndSet(true, false), "next was not called before remove");
    int iteratorIndexForRemove = (currentIteratorIndex - 1);
    iteratorIndexForRemove = (iteratorIndexForRemove < 0 ? iteratorList.size() - 1 : iteratorIndexForRemove);
    iteratorList.get(iteratorIndexForRemove).remove();
  }
614255
public void releaseCache() {
        if (originalThunks != null) {
            // OPTIMIZATION:
            // Rather than use the standard iterator, which creates lots of int[] arrays on the heap, which need to be GC'd,
            // we use the fast version that just mutates one array. Since this is read once for us here, this is ideal.
            Iterator<int[]> fastPassByReferenceIterator = fastPassByReferenceIterator();
            int[] assignment = fastPassByReferenceIterator.next();
            while (true) {
                setAssignmentValue(assignment, originalThunks.getAssignmentValue(assignment));

                // Set the assignment arrays correctly
                if (fastPassByReferenceIterator.hasNext()) fastPassByReferenceIterator.next();
                else break;
            }
            // Release our replicated set of original thunks
            originalThunks = null;
        }
    }
51279
@SuppressWarnings("unchecked")
    public final V get() {
        InternalThreadLocalMap threadLocalMap = InternalThreadLocalMap.get();
        Object v = threadLocalMap.indexedVariable(index);
        if (v != InternalThreadLocalMap.UNSET) {
            return (V) v;
        }

        return initialize(threadLocalMap);
    }
286133
private void prune()
	{
		if (useSoftReferences)
		{
			Iterator<Map.Entry<String, Object>> it = cache.entrySet().iterator();

			while (it.hasNext())
			{
				final Map.Entry<String, Object> entry = it.next();

				if (dereference(entry.getValue()) == null)
					it.remove();
			}
		}
	}
414100
public void removeTempLockedObject() {
        if (this != _resourceLocks._tempRoot) {
            // removing from tree
            if (_parent != null && _parent._children != null) {
                int size = _parent._children.length;
                for (int i = 0; i < size; i++) {
                    if (_parent._children[i].equals(this)) {
                        LockedObject[] newChildren = new LockedObject[size - 1];
                        for (int i2 = 0; i2 < (size - 1); i2++) {
                            if (i2 < i) {
                                newChildren[i2] = _parent._children[i2];
                            } else {
                                newChildren[i2] = _parent._children[i2 + 1];
                            }
                        }
                        if (newChildren.length != 0) {
                            _parent._children = newChildren;
                        } else {
                            _parent._children = null;
                        }
                        break;
                    }
                }

                // removing from hashtable
                _resourceLocks._tempLocksByID.remove(getID());
                _resourceLocks._tempLocks.remove(getPath());

                // now the garbage collector has some work to do
            }
        }
    }
799117
public void clear() {
        this.variables.clear();
        this.methods.clear();
        this.importedClasses.clear();
        this.importedPackages.clear();
        this.importedCommands.clear();
        this.importedObjects.clear();
        if (this.parent == null)
            this.loadDefaultImports();
        this.classCache.clear();
        this.names.clear();
    }
695868
synchronized Object removeValueGuts(String pName) {
        //create local variable - JIT performance improvement
        final boolean isTraceOn = com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINER)) {
            LoggingUtil.SESSION_LOGGER_WAS.entering(methodClassName, methodNames[REMOVE_VALUE_GUTS], "session " + getId() + " prop id " + pName);
        }

        Object tmp = getValueGuts(pName, false);
        // if object does not acutally exist, just return
        if (tmp == null) {
            if (isTraceOn && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINER)) {
                LoggingUtil.SESSION_LOGGER_WAS.exiting(methodClassName, methodNames[REMOVE_VALUE_GUTS], "prop id " + pName + " not in " + getId());
            }
            return null;
        }

        if (appDataRemovals == null) {
            if (isTraceOn && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[REMOVE_VALUE_GUTS], "init appDataRemovals " + getId());
            }
            appDataRemovals = new Hashtable();
        }

        if (appDataTablesPerThread) {
            if (isTraceOn && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[REMOVE_VALUE_GUTS], "appDataTablesPerThread");
            }
            Thread t = Thread.currentThread();
            Hashtable sht = (Hashtable) appDataRemovals.get(t);
            if (sht == null) {
                sht = new Hashtable();
                appDataRemovals.put(t, sht);
            }
            if (isTraceOn && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[REMOVE_VALUE_GUTS], "remove value for " + getId() + " and prop " + pName
                                                                                                                 + " via thread " + t);
            }
            sht.put(pName, pName);
        } else { //appDataTablesPerSession
            if (isTraceOn && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[REMOVE_VALUE_GUTS], "appDataTablesPerSession");
            }
            appDataRemovals.put(pName, pName);
        }

        Object ret = (mNonswappableData == null) ? null : mNonswappableData.remove(pName);
        if (ret == null)
            ret = getSwappableData().remove(pName);

        if (isTraceOn && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_WAS.exiting(methodClassName, methodNames[REMOVE_VALUE_GUTS]);
        }
        return ret;
    }
28102
private LocalThreadObjectPool getThreadLocalObjectPool() {
        if (threadPoolSize <= 0) {
            // no local thread pool needed.
            return null;
        }
        LocalThreadObjectPool localPool = null;
        if (threadLocals != null) {
            localPool = threadLocals.get();
            if (localPool == null) {
                localPool = new LocalThreadObjectPool(threadPoolSize, null, destroyer); // @PK36998C
                threadLocals.set(localPool);

                localPool.setCleanUpOld(cleanUpOld);
            }
        }

        return localPool;
    }
638507
public final VariableNumMap removeAll(int ... variableNums) {
    if (variableNums.length == 0) {
      return this;
    }

    int[] newNums = new int[nums.length];
    String[] newNames = new String[nums.length];
    Variable[] newVars = new Variable[nums.length];
    int numFilled = 0;
    for (int i = 0; i < newNums.length; i++) {
      if (!Ints.contains(variableNums, nums[i])) {
        newNums[numFilled] = nums[i];
        newNames[numFilled] = names[i];
        newVars[numFilled] = vars[i];
        numFilled++;
      }
    }
    return VariableNumMap.fromSortedArrays(newNums, newNames, newVars, numFilled);
  }
179219
public void removeLockedObject() {
        if (this != _resourceLocks._root && !this.getPath().equals("/")) {

            int size = _parent._children.length;
            for (int i = 0; i < size; i++) {
                if (_parent._children[i].equals(this)) {
                    LockedObject[] newChildren = new LockedObject[size - 1];
                    for (int i2 = 0; i2 < (size - 1); i2++) {
                        if (i2 < i) {
                            newChildren[i2] = _parent._children[i2];
                        } else {
                            newChildren[i2] = _parent._children[i2 + 1];
                        }
                    }
                    if (newChildren.length != 0) {
                        _parent._children = newChildren;
                    } else {
                        _parent._children = null;
                    }
                    break;
                }
            }

            // removing from hashtable
            _resourceLocks._locksByID.remove(getID());
            _resourceLocks._locks.remove(getPath());

            // now the garbage collector has some work to do
        }
    }
614680
protected function cleanThreadContext()
    {
        shmop_delete($this->internalIPCKey);
        shmop_delete($this->internalSemaphoreKey);

        shmop_close($this->internalIPCKey);
        shmop_close($this->internalSemaphoreKey);

        unlink($this->fileIPC1);
        unlink($this->fileIPC2);

        $this->running = false;
        unset($this->pid);
    }
981678
@SuppressWarnings({ "unchecked", "rawtypes" })
  public void remove() {
    super.remove();

    for (VariableInstanceEntity variableInstance : variableStore.getVariables()) {
      invokeVariableLifecycleListenersDelete(variableInstance, this,
          Arrays.<VariableInstanceLifecycleListener<CoreVariableInstance>>asList((VariableInstanceLifecycleListener) VariableInstanceEntityPersistenceListener.INSTANCE));
      variableStore.removeVariable(variableInstance.getName());
    }

    CommandContext commandContext = Context.getCommandContext();

    for (CaseSentryPartEntity sentryPart : getCaseSentryParts()) {
      commandContext
        .getCaseSentryPartManager()
        .deleteSentryPart(sentryPart);
    }

    // finally delete this execution
    commandContext
      .getCaseExecutionManager()
      .deleteCaseExecution(this);
  }
1273475
@Override
    public void removeAllVariables() {
        List<RoomVariable> vars = room.getVariables();
        for(RoomVariable var : vars) var.setNull();
        api.setRoomVariables(null, room, vars, true, true, false);
    }
321612
public void clear() {
	try {
	    Scope scope;
	    // Map.Entry entry,e;
	    // Map context;

	    // release all session scopes
	    Iterator<Entry<String, Map<String, Scope>>> sit = cfSessionContexts.entrySet().iterator();
	    Entry<String, Map<String, Scope>> sentry;
	    Map<String, Scope> context;
	    Iterator<Entry<String, Scope>> itt;
	    Entry<String, Scope> e;
	    PageContext pc = ThreadLocalPageContext.get();
	    while (sit.hasNext()) {
		sentry = sit.next();
		context = sentry.getValue();
		itt = context.entrySet().iterator();
		while (itt.hasNext()) {
		    e = itt.next();
		    scope = e.getValue();
		    scope.release(pc);
		}
	    }
	    cfSessionContexts.clear();

	    // release all application scopes
	    Iterator<Entry<String, Application>> ait = applicationContexts.entrySet().iterator();
	    Entry<String, Application> aentry;
	    while (ait.hasNext()) {
		aentry = ait.next();
		scope = aentry.getValue();
		scope.release(pc);
	    }
	    applicationContexts.clear();

	    // release server scope
	    if (server != null) {
		server.release(pc);
		server = null;
	    }

	}
	catch (Throwable t) {
	    ExceptionUtil.rethrowIfNecessary(t);
	}
    }
743696
public void cleanThreadLocals(Thread thread) {
        try {
            svThreadLocalsField.set(thread, null);
        } catch (IllegalAccessException e) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                Tr.debug(tc, "Unable to clear java.lang.ThreadLocals: ", e);
        }
    }