code: public function detach(\SplObserver $observer) {
          foreach ($this->_observers as $observerItem) {
              if ($observerItem->observer === $observer) {
                  $this->_observers->detach($observerItem);
              }
          }
      }
docs: Delete the observer from the list
  
  @param \SplObserver $observer