Cleanup function to remove all allocated listeners
171222
public void cleanup() {
        synchronized (_sslMap) {
            for (SslRelayOdo relay : _sslMap.values()) {
                if (relay.getHttpServer() != null && relay.isStarted()) {
                    relay.getHttpServer().removeListener(relay);
                }
            }

            sslRelays.clear();
        }
    }
1204932
function cleanup()
    {
        // destroy loop variable(s)
        foreach ( $this->LoopVariablesNames as $varName )
            $this->Tpl->unsetVariable( $varName, $this->RootNamespace );
    }
657003
private void cleanUpSource() {
		SoundStore store = SoundStore.get();
		
		AL10.alSourceStop(store.getSource(0));
		IntBuffer buffer = BufferUtils.createIntBuffer(1);
		int queued = AL10.alGetSourcei(store.getSource(0), AL10.AL_BUFFERS_QUEUED);
		
		while (queued > 0)
		{
			AL10.alSourceUnqueueBuffers(store.getSource(0), buffer);
			queued--;
		}
		
		AL10.alSourcei(store.getSource(0), AL10.AL_BUFFER, 0);
	}
360503
function remove_listener(event/*, listener*/) {

			// Ignore if not tcn event
			if(NoPg.isLocalEventName(event)) {
				return;
			}

			event = NoPg.parseEventName(event);

			// Stringifying back the event normalizes the original event name
			var event_name = NoPg.stringifyEventName(event);

			var channel_name = NoPg.parseTCNChannelName(event);

			counter[event_name] -= 1;
			if(counter[event_name] === 0) {
				//debug.log('Stopped listening channel ' + channel_name + ' for ' + event_name);
				self._db.removeListener(channel_name, tcn_listeners[event_name]);
				delete counter[event_name];
			}

		}
156916
def remove_listener(self, listener):
        
        self.logger.debug('discarding listener %r', listener)
        with self._lock:
            self._listeners.discard(listener)
208393
def clear_callbacks(obj):
    """"""
    callbacks = obj._callbacks
    if isinstance(callbacks, dllist):
        # Help the garbage collector by clearing all links.
        callbacks.clear()
    obj._callbacks = None
434768
function recursiveRemoveListeners(listeners: Object | any[]) {
  if (Array.isArray(listeners)) {
    listeners.forEach((listener, index) =>
      recursiveRemoveListeners(listener)
    );
  } else if (listeners instanceof ListenerTracker) {
    const id = listeners.id;
    const object = listeners.object;
    object._parent
        ? object._parent.removeListener(id)
        : object.removeListener(id);
  } else if (typeof listeners === 'object' && listeners !== null) {
    Object.keys(listeners).forEach(key =>
      recursiveRemoveListeners(listeners[key])
    );
  }
}
730740
def remove_all_listeners(self, event=None):
        
        if event is not None:
            self._registered_events[event] = OrderedDict()
        else:
            self._registered_events = defaultdict(OrderedDict)
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]);
			}
		}
	}
819259
function (implementOn, event, callback) {
	var stringy = callback.toString();

	if (this._cached[stringy]) {

		// Iteratre through the cached callbacks and remove the correct one based on reference
		for(var i=0,numCbs=this._cached[stringy].length; i < numCbs; i++) {
			if (this._cached[stringy][i].raw === callback) {
				implementOn.removeEventListener(event, this._cached[stringy][i].fn);
			}
		}
	}
}
866524
function removeResizeListener(resizeListener) {
        removeIdFromList(rootListener, resizeListener.id);
        if (a4p.isDefined(listenersIndex[resizeListener.id])) {
            delete listenersIndex[resizeListener.id];
        }
        if (a4p.isDefined(listenersIndex[resizeListener.name]) && (listenersIndex[resizeListener.name].id == resizeListener.id)) {
            delete listenersIndex[resizeListener.name];
        }
    }
1039458
function clearCache() {
  let deletedCount = 0;

  const iter = eventSourceMappingKeysByFunctionAndStream.entries();
  let next = iter.next();
  while (!next.done) {
    const [k, key] = next.value;

    const deleted = eventSourceMappingPromisesByKey.delete(key);
    eventSourceMappingKeysByFunctionAndStream.delete(k);

    if (deleted) {
      ++deletedCount;
    }

    next = iter.next();
  }

  return deletedCount;
}
199362
function() {

		if (this._binds) {

			for (var i = 0, count = this._binds.length; i < count; i++) {
				this._binds[i].removeListener(this._bind_changed_listeners[i]);
			}

			this._binds = this._bind_changed_listeners = null;

		}

		this._argument.removeListener(this._argument_changed_listener);
		this._observable_listener && this._flushObservable();

		if (this._own_collection) {

			this._value.destroy();

		}

		this.suspendRefreshable();

	}
1216935
function () {
                this.$assert(838, this._listenersStopped !== true);
                this._listenersStopped = true;
                var bindings = this._bindings;
                if (bindings) {
                    // remove binding
                    for (var index = 0, bind; bind = bindings[index]; index++) {
                        // remove the recursive listener
                        this.__json.removeListener(bind.inside, bind.to, bind.callback, bind.recursive);
                    }
                }
            }
939760
function removeListener(attr,func,child,update)
        {
          if(typeof func !== 'function') return bind;

          var isInput = (['value','checked'].indexOf(attr) !== -1),
              isStyle = (_allStyles.indexOf(attr) !== -1),
              listeners,
              x;

              function cut(attr,list)
              {
                var listenerFuncs = list[attr],
                    len = listenerFuncs.length;
                for(x=0;x<len;x++)
                {
                  if(listenerFuncs[x].toString() === func.toString())
                  {
                    listenerFuncs.splice(x,1);
                  }
                }
              }

          if(this.toString() !== bind.toString())
          {
            if(child)
            {
              var children = this.querySelectorAll('*'),
                  len = children.length;
              if(isStyle)
              {
                listeners = (update ? '_childStyleUpdateListeners' : '_childStyleListeners');
                cut(attr,this.attrListeners()[listeners]);
                listeners = (update ? '_parentStyleUpdateListeners' : '_parentStyleListeners');
              }
              else
              {
                if(attr === _all)
                {
                  listeners = (update ? '_childStyleUpdateListeners' : '_childStyleListeners');
                  cut(attr,this.attrListeners()[listeners]);
                }
                listeners = (update ? '_childAttrUpdateListeners' : '_childAttrListeners');
                cut(attr,this.attrListeners()[listeners]);
                listeners = (update ? '_parentAttrUpdateListeners' : '_parentAttrListeners');
              }
              for(x=0;x<len;x++)
              {
                var parents = children[x].attrListeners()[listeners][attr],
                    parentLen = parents.length;
                for(var i=0;i<parentLen;i++)
                {
                  if(parents[i].isEqualNode(this))
                  {
                    parents.slice(i,1);
                  }
                }
                if(attr === _all)
                {
                  listenersStyle = (update ? '_parentStyleUpdateListeners' : '_parentStyleListeners');
                  var parents = children[x].attrListeners()[listeners][attr],
                      parentLen = parents.length;
                  for(var i=0;i<parentLen;i++)
                  {
                    if(parents[i].isEqualNode(this))
                    {
                      parents.slice(i,1);
                    }
                  }
                }
              }
            }
            else
            {
              if(isStyle)
              {
                listeners = (update ? '_styleUpdateListeners' : '_styleListeners');
                cut(attr,this.attrListeners()[listeners]);
              }
              else
              {
                if(attr === _all)
                {
                  listeners = (update ? '_styleUpdateListeners' : '_styleListeners');
                  cut(attr,this.attrListeners()[listeners]);
                }
                listeners = (update ? '_attrUpdateListeners' : '_attrListeners');
                cut(attr,this.attrListeners()[listeners]);
              }
            }
          }
          else
          {
            if(isStyle)
            {
              listeners = (update ? _styleUpdateListeners : _styleListeners);
              cut(attr,listeners);
            }
            else
            {
              if(attr === _all)
              {
                listeners = (update ? _styleUpdateListeners : _styleListeners);
                cut(attr,listeners);
              }
              listeners = (update ? _attrUpdateListeners : _attrListeners);
              cut(attr,listeners);
            }
          }
        }
1074598
function () {
            this.cleanCache();

            var mapping = this.__delegateMapping;
            if (mapping) {

                for (var id in mapping) {
                    if (mapping.hasOwnProperty(id)) {
                        this.remove(id);
                    }
                }

                var body = Aria.$window.document.body;
                var utilEvent = ariaUtilsEvent, index, l;
                for (index = 0, l = this.delegatedOnBody.length; index < l; index++) {
                    utilEvent.removeListener(body, this.delegatedOnBody[index], {
                        fn : this.delegate
                    });
                }
                for (index = 0, l = this.delegatedOnWindow.length; index < l; index++) {
                    utilEvent.removeListener(this.rootListener, this.delegatedOnWindow[index], {
                        fn : this.delegate
                    });
                }
                this.__delegateMapping = null;

                // do this after removing listeners as we need it to remove listeners:
                this.rootListener = null;

                // nullify dom reference
                this._focusTracking = null;

                ariaUtilsAriaWindow.detachWindow();
            }
        }
148498
void cleanUpStaleEntries() {
        for (KeyedRef<K, V> ref = q.poll(); ref != null; ref = q.poll()) {
            map.remove(ref.getKey(), ref); // CONCURRENT remove() operation
        }
    }