Clears the registry to prepare for re-registration (e.g. as part of a reload).
320083
public void clear() {
        synchronized (extensions) {    // we synchronize just to guard unnamedMerged
            transformerRegistry = TransformerRegistry.Factory.create();
            extensions.clear();
            reverseMap.clear();
            subsystemsInfo.clear();
        }
    }
292317
public function afterRegistry()
    {
        $agenda = $this->loader->getAgenda();

        if ($agenda) {
            $this->addColumn(
                    "CASE WHEN gap_status IN ('" .
                        implode("', '", $agenda->getStatusKeysInactive()) .
                        "') THEN 'deleted' ELSE '' END",
                    'row_class'
                    );

            $codes = $agenda->getStatusCodesInactive();
            if (isset($codes['CA'])) {
                $cancelCode = 'CA';
            } elseif ($codes) {
                reset($codes);
                $cancelCode = key($codes);
            } else {
                $cancelCode = null;
            }
            if ($cancelCode) {
                $this->setDeleteValues('gap_status', $cancelCode);
            }
        }
    }
724342
public static void resetAllCounters() {
    for (Map.Entry<String, Counter> entry : METRIC_REGISTRY.getCounters().entrySet()) {
      entry.getValue().dec(entry.getValue().getCount());
    }
  }
515391
public function clear()
	{
		$this->_basket = $this->_domainManager->createItem();
		$this->_domainManager->setSession( $this->_basket );
	}
247646
function () {
        var i, entries = registry.entries()
        for (i in entries) {
          if (entries[i].type && entries[i].type !== 'unload')
            remove(entries[i].element, entries[i].type)
        }
        win[detachEvent]('onunload', cleanup)
        win.CollectGarbage && win.CollectGarbage()
      }
379603
public void clear() {

        if (m_handlerRegistration != null) {
            m_handlerRegistration.removeHandler();
            m_handlerRegistration = null;
        }
        m_changeListeners.clear();
        m_scopeValues.clear();
        m_observerdEntity = null;
    }
204559
def __unregister_services(self):
        
        # Copy the services list, as it will be modified during the process
        with self.__registration_lock:
            registered_services = self.__registered_services.copy()

        for registration in registered_services:
            try:
                registration.unregister()
            except BundleException:
                # Ignore errors at this level
                pass

        if self.__registered_services:
            _logger.warning("Not all services have been unregistered...")

        with self.__registration_lock:
            # Clear the list, just to be clean
            self.__registered_services.clear()
90490
public function clear()
    {
        $this->entityPersisters               =
        $this->collectionPersisters           =
        $this->eagerLoadingEntities           =
        $this->identityMap                    =
        $this->entityIdentifiers              =
        $this->originalEntityData             =
        $this->entityChangeSets               =
        $this->entityStates                   =
        $this->scheduledForSynchronization    =
        $this->entityInsertions               =
        $this->entityUpdates                  =
        $this->entityDeletions                =
        $this->collectionDeletions            =
        $this->collectionUpdates              =
        $this->extraUpdates                   =
        $this->readOnlyObjects                =
        $this->visitedCollections             =
        $this->nonCascadedNewDetectedEntities =
        $this->orphanRemovals                 = [];
    }
1086190
public function clear()
    {
        $this->id = null;
        $this->name = null;
        $this->role = null;
        $this->alreadyInSave = false;
        $this->alreadyInValidation = false;
        $this->alreadyInClearAllReferencesDeep = false;
        $this->clearAllReferences();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
831991
public function clear()
	{
		if( $this->prefix ) {
			$this->object->flushByTag( $this->prefix . 'siteid' );
		} else {
			$this->object->flush();
		}
	}
1304614
public static void cleanup ()
  {
    // Reinitialize singletons to the default values
    if (LocaleCache.isInstantiated ())
      LocaleCache.getInstance ().reinitialize ();
    if (CountryCache.isInstantiated ())
      CountryCache.getInstance ().reinitialize ();
    if (LanguageCache.isInstantiated ())
      LanguageCache.getInstance ().reinitialize ();
    if (SerializationConverterRegistry.isInstantiated ())
      SerializationConverterRegistry.getInstance ().reinitialize ();
    if (MimeTypeDeterminator.isInstantiated ())
      MimeTypeDeterminator.getInstance ().reinitialize ();
    if (ThirdPartyModuleRegistry.isInstantiated ())
      ThirdPartyModuleRegistry.getInstance ().reinitialize ();
    if (TypeConverterRegistry.isInstantiated ())
      TypeConverterRegistry.getInstance ().reinitialize ();
    if (URLProtocolRegistry.isInstantiated ())
      URLProtocolRegistry.getInstance ().reinitialize ();
    if (EqualsImplementationRegistry.isInstantiated ())
      EqualsImplementationRegistry.getInstance ().reinitialize ();
    if (HashCodeImplementationRegistry.isInstantiated ())
      HashCodeImplementationRegistry.getInstance ().reinitialize ();

    // Clear caches
    if (DefaultTextResolver.isInstantiated ())
      DefaultTextResolver.getInstance ().clearCache ();
    EnumHelper.clearCache ();
    ResourceBundleHelper.clearCache ();
    if (RegExCache.isInstantiated ())
      RegExCache.getInstance ().clearCache ();
    CollatorHelper.clearCache ();
    LocaleHelper.clearCache ();
    StatisticsManager.clearCache ();
    SystemProperties.clearWarnedPropertyNames ();
    if (ImageDataManager.isInstantiated ())
      ImageDataManager.getInstance ().clearCache ();

    // Clean this one last as it is used in equals and hashCode implementations!
    ClassHierarchyCache.clearCache ();
  }
1116045
@Override
    public boolean clearRegistry() throws SalException {
        boolean result = this.serviceManager.clearServices();
        // Only try if we could delete the services
        if (result)
            result = result & this.docManager.clearDocuments();

        // Only try if we could delete the services and the docs
        if (result)
            result = result & this.kbManager.clearKnowledgeBase();

        return result;
    }
1109670
def free_register(self, reg):
        """"""
        if reg not in self.used_registers:
            self.error("register %s is not taken" % self.REGISTERS[reg])
        self.used_registers.remove(reg)
        self.free_registers.append(reg)
        self.free_registers.sort(reverse = True)
1355875
@Deprecated
    public final void remove(MeterRegistry registry) {
        for (; ; ) {
            if (childrenGuard.compareAndSet(false, true)) {
                try {
                    Map<MeterRegistry, T> newChildren = new IdentityHashMap<>(children);
                    newChildren.remove(registry);
                    this.children = newChildren;
                    break;
                } finally {
                    childrenGuard.set(false);
                }
            }
        }
    }
65511
def reset(self):
        """"""
        try:
            self._invalidate_cached_registers()
            self._link.reset()
        except DAPAccess.Error as exc:
            six.raise_from(self._convert_exception(exc), exc)
862249
public void clear() {
        mCardNumberEditText.setText("");
        mExpiryDateEditText.setText("");
        mCvcEditText.setText("");
        mPostalCodeEditText.setText("");
        mCardNumberEditText.setShouldShowError(false);
        mExpiryDateEditText.setShouldShowError(false);
        mCvcEditText.setShouldShowError(false);
        mPostalCodeEditText.setShouldShowError(false);
        updateBrand(Card.UNKNOWN);
    }
717482
public void clear()
    {
        // clear out ref queue. We don't need to expunge entries
        // since table is getting cleared.
        emptySoftQueue();

        Entry tab[] = table;
        for (int i = 0; i < tab.length; ++i)
            tab[i] = null;
        size = 0;

        // Allocation of array may have caused GC, which may have caused
        // additional entries to go stale.  Removing these entries from the
        // reference queue will make them eligible for reclamation.
        emptySoftQueue();
    }