Clear {@link Graph.Monitor} which will be called the graph is about to inject or release an object
512071
public void clearMonitors() {
        if (uiThreadRunner.isOnUiThread()) {
            graph.clearMonitors();
        } else {
            uiThreadRunner.post(new Runnable() {
                @Override
                public void run() {
                    graph.clearMonitors();
                }
            });
        }
    }
559111
private void stopActivityMonitor(){
		try {
			// Remove the monitor added during startup
			if (activityMonitor != null) {
				inst.removeMonitor(activityMonitor);
				activityMonitor = null;
			}
		} catch (Exception ignored) {}

	}
1037500
function() {

        // Don't continue if the probe portion was what changed.
        var thisMonitor = JSON.stringify(monitor.toMonitorJSON());
        if (thisMonitor === t.priorMonitor) {
          return;
        }

        // Remove the component listeners
        log.info('render.monitorChange', t.logCtxt);
        component.off('change:css change:viewOptions', applyStyles);
        component.off('change:monitor', onMonitorChange, t);

        // Disconnect, then build a fresh component
        t.connectMonitor(false, function(){
          UI.pageView.removeComponent(t.model);
          UI.pageView.addComponent(t.model);
        });
      }
892359
def clear(self):
        
        self.io.seek(0)
        self.io.truncate()
        for item in self.monitors:
            item[2] = 0
797126
@Override
    public void clear() {
        Supplier<Object> clearStrategy = () -> {
            if (size == 0) {
                return null;
            }
            Arrays.fill(ringBuffer, null);
            size = 0;
            headIndex = 0;
            tailIndex = 0;
            modificationsCount++;
            return null;
        };
        writeConcurrently(clearStrategy);
    }
272688
protected void unsetMonitor(ServiceReference<FileMonitor> monitorRef) {
        MonitorHolder holder = fileMonitors.remove(monitorRef);

        if (holder != null) {
            holder.destroy();
        }
    }
778746
@Override
    public void clear() throws CouldNotPerformException {
        lock();
        try {
            pluginPool.beforeClear();
            sandbox.clear();
            entryMap.clear();
            consistent = true;
        } finally {
            unlock();
        }
        notifyObservers();
    }
817460
public void dispose() {
		singleton.clear();
		components.clear();
		pointcuts.clear();
		contexts.clear();
		instances.clear();
	}
1275467
public void clear() {
    for (final Pair<ExecutionReference, ExecutableFlow> pair : this.queuedFlowMap.values()) {
      dequeue(pair.getFirst().getExecId());
    }
  }
996727
@Override
    public boolean clearServices() throws ServiceException {

        if (!this.graphStoreManager.canBeModified()) {
            log.warn("The dataset cannot be modified.");
            return false;
        }

        log.info("Clearing services registry.");
        this.graphStoreManager.clearDataset();

        // Generate Event
        this.getEventBus().post(new ServicesClearedEvent(new Date()));

        return true;
    }
827899
function _cleanObserver(observer) {
        if (!attachedNotifierCountMap.get(observer) && !pendingChangesMap.has(observer)) {
            attachedNotifierCountMap.delete(observer);
            var index = observerCallbacks.indexOf(observer);
            if (index !== -1) {
                observerCallbacks.splice(index, 1);
            }
        }
    }
218168
public void clear() {
    lock.lock();
    try {
      currentControlTuple = null;
      currentDataTuple = null;

      outQueue.clear();
    } finally {
      lock.unlock();
    }
  }
943592
def clear_graph(identifier=None):
    
    graph = get_graph()
    if identifier:
        graph.destroy(identifier)
    try:
        graph.close()
    except:
        warn("Unable to close the Graph")
162447
@VisibleForTesting
  static void unsafeResetExporter() {
    synchronized (monitor) {
      if (instance != null) {
        instance.intervalMetricReader.stop();
      }
      instance = null;
    }
  }
56322
public void clear() {
        synchronized (mLock) {
            if (mOriginalValues != null) {
                mOriginalValues.clear();
            } else {
                mObjects.clear();
            }
        }
        if (mNotifyOnChange) notifyDataSetChanged();
    }
455740
public void clear() {
		columnLookup.clear();
		rowLookup.clear();
		data = null;
		dataGrid.clear();
		doubleValues.clear();
		System.gc();
	}
244620
@Override
    public boolean unregisterMonitor(Object annotatedObject) {
        // Clear the listener data
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(this, tc, "unregisteringMonitor =  " + annotatedObject);
        }
        Set<ProbeListener> listeners = removeListenersForMonitor(annotatedObject);
        if (listeners == null) {
            return false;
        }

        // Remove the listeners associated with the inactive monitor and
        // find out which classes need to be transformed to remove stale probes
        Collection<Class<?>> effectedClasses = processRemovedListeners(listeners);

        // Update the classes to remove dead probes (optional)
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(this, tc, "effectedClasses.size() =  " + effectedClasses.size());
        }
        this.transformer.instrumentWithProbes(effectedClasses);
        Set set = moduleInstanceToBundleMap.entrySet();
        Iterator i = set.iterator();
        while (i.hasNext()) {
            Map.Entry mapE = (Map.Entry) i.next();
            if (mapE != null && mapE.getValue().equals(annotatedObject.getClass().getName())) {
                PmiAbstractModule s = (PmiAbstractModule) mapE.getKey();
                s.unregister();
            }
        }
        return true;
    }