detaches an observer from the observable.

@param ObserverInterface $observer
@return void
972387
public function detach(ObserverInterface $observer): void
    {
        $key = spl_object_hash($observer);

        unset($this->observers[$key]);
    }
998842
public function remove(EventInterface $event)
    {
        $index = $this->computeIndex($event);
        if (isset($this->events[$index])) {
            foreach ($this->events[$index] as $key => $internalEvent) {
                if ($event->getUid() == $internalEvent->getUid()) {
                    unset($this->events[$index][$key]);
                    --$this->count;
                }
            }
        }
    }
774465
protected function removeObserversByEvent(string $event, callable $callback): EventInterface
    {
        //if event isn't set
        if (!isset($this->observers[$event])) {
            //do nothing
            return $this;
        }

        //'foobar' => array(
        foreach ($this->observers[$event] as $i => $observer) {
            //0 => callback
            if ($observer['observer']->assertEquals($callback)) {
                unset($this->observers[$event][$i]);
            }
        }

        return $this;
    }
9209
public function destroyRegisteredSsoClientSessions(SessionInterface $session) {
		if (!$session->isStarted()) {
			return;
		}

		$ssoClients = $this->getRegisteredSsoClients($session);
		$sessionId = $session->getId();

		$ssoServer = $this->ssoServerFactory->create();
		$this->ssoClientNotifier->destroySession($ssoServer, $sessionId, $ssoClients);
	}
833934
public function detach(\Zend\EventManager\EventManagerInterface $oEvents) {
        foreach ($this->listeners as $iIndex => $oListener) {
            if ($oEvents->detach($oListener)) {
                unset($this->listeners[$iIndex]);
            }
        }
    }
1053445
final public function detach($observer)
  {
    $key = array_search($observer, $this->_observers);
    if ($key !== false) {
      unset($this->_observers[$key]);
    }
    return $this;
  }
1101175
public function free(EntityNodeInterface $entity)
	{
		$this->repository->free($entity);
		$this->repository = null;
	}
1268840
public function handle(AttributeCodeAndValueAwareObserverInterface $observer)
    {

        // set the observer
        $this->setObserver($observer);

        // replace the passed attribute value into the display mode
        return $this->getSubject()->getDisplayModeByValue($observer->getAttributeValue());
    }
535309
public function detach(\Zend_EventManager_EventCollection $events)
    {
        foreach($this->listeners as $index => $listener) {
            if($events->detach($listener)) {
                unset($this->listeners[$index]);
            }
        }
    }
275046
public void unregister(EventObserver<?> observer){
        for (Map.Entry<Class, Set<EventObserver>> entry : observers.entrySet()) {
            entry.getValue().remove(observer);
        }

    }
595764
public function offsetUnset($offset)
    {
        foreach ($this->observer as $observer) {
            if (strtolower($observer->getName()) === strtolower($offset)) {
                $this->observer->detach($observer);
            }
        }

        return;
    }
1044015
public function nodeRemoved(NodeInterface $node)
    {
        if (!$this->eventEmittingService->isEnabled()) {
            return;
        }

        /* @var $nodeEvent NodeEvent */
        $nodeEvent = $this->eventEmittingService->emit(self::NODE_REMOVED, [], NodeEvent::class);
        $nodeEvent->setNode($node);
    }
821996
public function remove(EventInterface $event)
    {
        foreach ($this->events as $key => $internalEvent) {
            if ($event->getUid() === $internalEvent->getUid()) {
                unset($this->events[$key]);
            }
        }
    }
620801
@MainThread
    public void removeObserver(@NonNull final Observer<T> observer) {
        assertMainThread("removeObserver");
        ObserverWrapper removed = mObservers.remove(observer);
        if (removed == null) {
            return;
        }
        removed.detachObserver();
        removed.activeStateChanged(false);
    }
850173
public function detach($observer)
	{
		$retval = false;

		$key = array_search($observer, $this->_observers);

		if ($key !== false)
		{
			unset($this->_observers[$key]);
			$retval = true;

			foreach ($this->_methods as &$method)
			{
				$k = array_search($key, $method);

				if ($k !== false)
				{
					unset($method[$k]);
				}
			}
		}

		return $retval;
	}
948748
public function execute(Observer $observer)
    {
        if (!$this->scopeConfig->getValue(self::CONFIG_PATH_REDIRECT_TO_CHECKOUT, ScopeInterface::SCOPE_STORE)) {
            return;
        }

        /** @var Http $request */
        $request = $observer->getData('request');
        $request->setParam('return_url', $this->url->getUrl('checkout'));
    }
922058
protected function validateObserver($observer): bool
    {
        return !$this->isDisable($observer)
            && (new ReflectionClass($observer))->implementsInterface(EventHandlerInterface::class)
            && $this->accessible($observer);
    }