Removes a single instance of the specified event handler
 from the list of event handlers.  Therefore, if you've
 registered the same event handler 3 times, then you will
 need to unregister it 3 times as well.
428408
def unregister(*args, &block)
      h = Unobservable.handler_for(*args, &block)
      index = @handlers.index(h)
      if index
        @handlers.slice!(index)
        return h
      else
        return nil
      end
    end
33547
def removeEventListener(self, event: str, listener: _EventListenerType
                            ) -> None:
        
        self._remove_event_listener(event, listener)
1268654
def unregister(self, name: str):
        ''''''
        del self._callbacks[name]

        if self._event_dispatcher is not None:
            self._event_dispatcher.unregister(name)
1053657
def unregister_listener(self, listener):
        
        if not isinstance(listener, IEventListener):
            raise TypeError("listener can only be an instance of type IEventListener")
        self._call("unregisterListener",
                     in_p=[listener])
899955
function (events, handler) {
    var handlers = this.handlers;
    splitStr(events).forEach(function (event) {
      if (!handler) {
        delete handlers[event];
      } else {
        handlers[event].splice(handlers[event].indexOf(handler), 1);
      }
    });
    return this;
  }
743194
function once(evt, handler) {
            var thisArg = arguments[2] === undefined ? null : arguments[2];

            var wrapper = undefined,
                self = this;
            // add a wrapper around the handler and listen to the requested event
            this.on(evt, wrapper = function () {
                for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
                    args[_key4] = arguments[_key4];
                }

                try {
                    handler.apply.apply(handler, [thisArg].concat(args));
                } catch (err) {
                    console.error("ONCE handler received an error: " + err.message + ", " + JSON.stringify(err));
                } finally {
                    // remove the wrapper so that the event doesn't call us again
                    self.off(evt, wrapper, thisArg);
                }
            }, thisArg);
        }
161709
function(type, handler) {
      if (!this.listeners_)
        return;
      if (type in this.listeners_) {
        var handlers = this.listeners_[type];
        var index = handlers.indexOf(handler);
        if (index >= 0) {
          // Clean up if this was the last listener.
          if (handlers.length == 1)
            delete this.listeners_[type];
          else
            handlers.splice(index, 1);
        }
      }
    }
749586
def remove_event_handler(self, callback, event=None):
        
        found = 0
        if event and not isinstance(event, type):
            event = type(event)

        i = len(self._event_builders)
        while i:
            i -= 1
            ev, cb = self._event_builders[i]
            if cb == callback and (not event or isinstance(ev, event)):
                del self._event_builders[i]
                found += 1

        return found
16647
public void unregister(EventDefinition eventDefinition, IEventListener eventListener) {
        if (eventDefinition.getType() == EventDefinition.TYPE_POST) {
            unregister(listenersPost, eventDefinition, eventListener);
        } else {
            unregister(listeners, eventDefinition, eventListener);
        }
    }
851760
def _delete_handler(self, handler_class):
        """"""
        to_remove = self._get_handler(handler_class)
        if not to_remove:
            logging.warning('Error we should have an element to remove')
        else:
            self.handlers.remove(to_remove)
            self.logger.removeHandler(to_remove)
869012
<T> boolean remove(Class<T> eventClass, Listener<T> listener) {
		lock.readLock().lock();
		TreeSet<ListenerReferenceHolder> set = listeners.get(eventClass);
		if (set != null) {
			lock.readLock().unlock();
			lock.writeLock().lock();
			try {
				DefaultListenerWrapper wrapper = new DefaultListenerWrapper(listener);
				for (ListenerReferenceHolder current : set) {
					if (wrapper.equals(current.getListenerWrapper())) {
						return removeListenerAndSetIfNeeded(eventClass, current, set);
					}
				}
				return false;
			} finally {
				lock.writeLock().unlock();
			}
		}
		lock.readLock().unlock();
		return false;
	}
1365259
function removeEventListener(el, eventName, handler) {
    if (window.jQuery) {
      $(el).off(eventName, handler);
    } else if (el.removeEventListener) {
      el.removeEventListener(eventName, handler);
    } else {
      el.detachEvent('on' + eventName, handler);
    }
  }
4222
def remove_listener(self, event, callback, single=None, priority=None):
        
        event_stack = self._events[event]
        for x in event_stack:
            if x['callback'] == callback and \
               (single is None or x['single'] == single) and \
               (priority is None or x['priority'] == priority):
                event_stack.remove(x)
                break
        else:
            raise KeyError('Listener not found for "%s": %s' % (event,
                           callback))
141071
public void unregister(final Object listener) {
		for (Class clazz = listener.getClass(); clazz != null; clazz = clazz.getSuperclass()) {
			this.handlersByEventType.removeAll(clazz);
		}
	}
185635
def unregister_handler(self, handler_or_func):
        
        index = -1
        for i, handler in enumerate(self._direct_handlers):
            if handler is handler_or_func or handler._original_func is handler_or_func:
                index = i
                break
        if index >= 0:
            self._direct_handlers.pop(index)
            self._cached_handlers = None

        elif self.parent_class_hook is not None and self.parent_class_hook.has_handler(handler_or_func):
            self.parent_class_hook.unregister_handler(handler_or_func)
            self._cached_handlers = None

        elif self.instance_class_hook is not None and self.instance_class_hook.has_handler(handler_or_func):
            self.instance_class_hook.unregister_handler(handler_or_func)
            self._cached_handlers = None

        else:
            raise ValueError('{} is not a registered handler of {}'.format(handler_or_func, self))
833053
function removeHandler(node, eventType, handler, thisObject){
    node = getNode(node);

    var handlers = node === global ? globalEvents : node[EVENT_HOLDER];
    if (handlers)
    {
      var eventTypeHandlers = handlers[eventType];
      if (eventTypeHandlers)
      {
        for (var i = 0, item; item = eventTypeHandlers[i]; i++)
        {
          if (item.handler === handler && item.thisObject === thisObject)
          {
            // delete event handler
            eventTypeHandlers.splice(i, 1);

            // if there is no more handler for this event, clear it
            if (!eventTypeHandlers.length)
              clearHandlers(node, eventType);

            return;
          }
        }
      }
    }
  }
853540
function(node, eventName, handler) {
        if (this.recognizers[eventName]) {
            this.teardownGesture(node, eventName);
        }
        node.removeEventListener(eventName, handler);
    }