removes a given listener by looking at all registered targets and their listeners. if there are no more listeners to a target, the registered target is removed from the mTargets map.
14132
function destroy(oListener) {
		for (var n in mTargets) {
			var oTargetConfig = mTargets[n];
			for (var i = 0; i < oTargetConfig.listeners.length; i++) {
				if (oTargetConfig.listeners[i] === oListener) {
					oTargetConfig.listeners.splice(i, 1);
					oTargetConfig.configurations.splice(i, 1);
				}
			}
			if (oTargetConfig.listeners && oTargetConfig.listeners.length === 0) {
				delete mTargets[n];
				oTargetConfig.object._observer = undefined;
			}
		}
	}
494104
public void removeListener( IDmListener listener ) {

		if( listener != null ) {
			synchronized( this.dmListeners ) {
				this.dmListeners.remove( listener );
			}

			this.logger.info( "The listener '" + listener.getId() + "' is not available anymore in Roboconf's DM." );
		} else {
			this.logger.info( "An invalid DM listener was removed." );
		}

		listListeners();
	}
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;
    }
1017200
protected Future<T> removeFromListeners(
    GenericCompletionListener<? extends Future<T>> listener) {
    if (listener == null) {
      throw new IllegalArgumentException("The listener can't be null.");
    }

    if (!isDone()) {
      synchronized(this) {
        listeners.remove(listener);
      }
    }
    return this;
  }
203593
public <T extends EventListener> void unsubscribe(EventPublisher source, T listener) {
	log.debug("[unsubscribe] Removing {} --> {}", source.getClass().getName(), listener.getClass().getName());
	GenericEventDispatcher<T> dispatcher = (GenericEventDispatcher<T>) dispatchers.get(source);
	dispatcher.removeListener(listener);
    }
806541
function()
	{
		// Cleans all objects where listeners have been added
		for (var i = 0; i < mxEvent.objects.length; i++)
		{
			if (mxEvent.objects[i].mxListenerList != null)
			{
				mxEvent.removeAllListeners(mxEvent.objects[i]);
			}
		}
	}
219260
def unregister_listener(self, listener):
        
        listener_id = hashable_identity(listener)
        self._listeners.pop(listener_id, None)
872346
public synchronized <T extends EventListener> void remove(Class<T> type, T listener) {
		assert listener != null;
		// Is l on the list?
		int index = -1;
		for (int i = this.listeners.length - 2; i >= 0; i -= 2) {
			if ((this.listeners[i] == type) && (this.listeners[i + 1].equals(listener))) {
				index = i;
				break;
			}
		}

		// If so,  remove it
		if (index != -1) {
			final Object[] tmp = new Object[this.listeners.length - 2];
			// Copy the list up to index
			System.arraycopy(this.listeners, 0, tmp, 0, index);
			// Copy from two past the index, up to
			// the end of tmp (which is two elements
			// shorter than the old list)
			if (index < tmp.length) {
				System.arraycopy(this.listeners, index + 2, tmp, index,
						tmp.length - index);
			}
			// set the listener array to the new array or null
			this.listeners = (tmp.length == 0) ? NULL : tmp;
		}
	}
716805
public function clearAllListeners()
    {
        foreach ($this->raw_listeners as $eventName => $data) {
            foreach ($data as $listeners) {
                foreach ($listeners as $listener) {
                    $this->removeListener($eventName, $listener);
                }
            }
        }

        $this->raw_listeners = [];
    }
646741
function clearListeners(context) {
		if (context == null) { throw new Error('clearListeners: context must be provided.'); }
		// notify for every listener we throw out.
		var removedListeners, trackRemovals = false;
		if (this._emitterMetaEventsOn === true) {
			trackRemovals = true;
			removedListeners = [];
		}
		this._emitterListeners.filterAll(function(record) {
			var keepListener = record.registeredContext !== context;
			if (trackRemovals && keepListener === false) {
				removedListeners.push(record);
			}
			return keepListener;
		});
		if (trackRemovals && removedListeners.length > 0) {
			notifyRemoves(this, removedListeners);
		}
	}
730740
def remove_all_listeners(self, event=None):
        
        if event is not None:
            self._registered_events[event] = OrderedDict()
        else:
            self._registered_events = defaultdict(OrderedDict)
1229379
@Override
	public void removeListeners(String nodeID) {
		boolean found = false;
		writeLock.lock();
		try {
			Iterator<HashMap<String, Strategy<ListenerEndpoint>>> groupIterator = listeners.values().iterator();
			while (groupIterator.hasNext()) {
				HashMap<String, Strategy<ListenerEndpoint>> groups = groupIterator.next();
				Iterator<Strategy<ListenerEndpoint>> strategyIterator = groups.values().iterator();
				while (strategyIterator.hasNext()) {
					Strategy<ListenerEndpoint> strategy = strategyIterator.next();
					if (strategy.remove(nodeID)) {
						found = true;
						if (strategy.isEmpty()) {
							strategyIterator.remove();
						}
					}
				}
				if (groups.isEmpty()) {
					groupIterator.remove();
				}
			}
		} finally {

			// Clear caches
			if (found) {
				emitterCache.clear();
				broadcasterCache.clear();
				localBroadcasterCache.clear();
			}

			writeLock.unlock();
		}
	}
953282
public void removeAll() {
        int size = size();
        if (size == 0) {
            return;
        }
        for (int i = 0, listSize = lists.size(); i < listSize; i++) {
            List<? extends T> list = lists.get(i);
            if (list instanceof ObservableList) {
                ((ObservableList) list).removeOnListChangedCallback(callback);
            }
        }
        lists.clear();
        modCount += 1;
        listeners.notifyRemoved(this, 0, size);
    }
680421
public <T extends ObjectAttachableListener> void removeObjectListener(
            Class<?> objectClass, long objectId, Class<T> listenerClass, T listener) {
        synchronized (objectListeners) {
            if (objectClass == null) {
                return;
            }
            Map<Long, Map<Class<? extends ObjectAttachableListener>, Map<ObjectAttachableListener,
                    ListenerManagerImpl<? extends ObjectAttachableListener>>>> objectListener =
                    objectListeners.get(objectClass);
            if (objectListener == null) {
                return;
            }
            Map<Class<? extends ObjectAttachableListener>, Map<ObjectAttachableListener,
                    ListenerManagerImpl<? extends ObjectAttachableListener>>> listeners = objectListener.get(objectId);
            if (listeners == null) {
                return;
            }
            Map<ObjectAttachableListener, ListenerManagerImpl<? extends ObjectAttachableListener>> classListeners =
                    listeners.get(listenerClass);
            if (classListeners == null) {
                return;
            }
            ListenerManagerImpl<? extends ObjectAttachableListener> listenerManager = classListeners.get(listener);
            if (listenerManager == null) {
                return;
            }
            classListeners.remove(listener);
            listenerManager.removed();
            // Clean it up
            if (classListeners.isEmpty()) {
                listeners.remove(listenerClass);
                if (listeners.isEmpty()) {
                    objectListener.remove(objectId);
                    if (objectListener.isEmpty()) {
                        objectListeners.remove(objectClass);
                    }
                }
            }
        }
    }
1338055
public void removePrefetchingListeners()
    {
        if (prefetchingListeners != null)
        {
            for (Iterator it = prefetchingListeners.iterator(); it.hasNext(); )
            {
                PBPrefetchingListener listener = (PBPrefetchingListener) it.next();
                listener.removeThisListener();
            }
            prefetchingListeners.clear();
        }
    }
1024696
def deregister_listener(self, member_uuid, listener):
        
        self._casts[str(member_uuid)]['listeners'].remove(listener)
1285895
boolean remove(Class<?> eventClass, ListenerReferenceHolder listener) {
		lock.readLock().lock();
		TreeSet<ListenerReferenceHolder> set = listeners.get(eventClass);
		if (set != null) {
			lock.readLock().unlock();
			lock.writeLock().lock();
			try {
				return removeListenerAndSetIfNeeded(eventClass, listener, set);
			} finally {
				lock.writeLock().unlock();
			}
		}
		lock.readLock().unlock();
		return false;
	}