/*
Method to remove a subscribed source.
435485
public void removeSubscribedSource(Source source) {
        String sourceId = CollectorManagerUtils.getSourceId(source);
        subscribedSources.remove(sourceId);
    }
346539
def _removeReceiver(receiver):
    """"""
    if not sendersBack:
        # During module cleanup the mapping will be replaced with None
        return False
    backKey = id(receiver)
    try:
        backSet = sendersBack.pop(backKey)
    except KeyError:
        return False 
    else:
        for senderkey in backSet:
            try:
                signals = list(connections[senderkey].keys())
            except KeyError:
                pass
            else:
                for signal in signals:
                    try:
                        receivers = connections[senderkey][signal]
                    except KeyError:
                        pass
                    else:
                        try:
                            receivers.remove( receiver )
                        except Exception:
                            pass
                    _cleanupConnections(senderkey, signal)
1238817
function(listener) {
            var instance = this;
            if (listener) {
                instance._removeSubscribers(listener, '*:*');
            }
            else {
                // we cannot just redefine _subs, for it is set as readonly
                instance._subs.itsa_each(
                    function(value, key) {
                        delete instance._subs[key];
                    }
                );
            }
        }
1237857
function remove(client) {
  if(!clients) {
    return;
  }

  var idx = clients.indexOf(client);
  if(idx > -1) {
    clients.splice(idx, 1);
  }
}
709324
def remove_service_listener(self, listener):
        """"""
        for browser in self.browsers:
            if browser.listener == listener:
                browser.cancel()
                del(browser)
370751
protected void unregisterElementErrListener(MediaElement element, final ListenerSubscription subscription) {
		if (element == null || subscription == null) {
			return;
		}
		element.removeErrorListener(subscription);
	}
416999
public function removeSubscriber(SubscriberInterface $subscriber)
    {
        if (is_array($subscriber->getSubscriberEvents())) {
            foreach ($subscriber->getSubscriberEvents() as $subscriberEvent => $params) {
                $this->removeListener($subscriberEvent, array($subscriber, $params));
            }
        }
    }
1312466
public void unsubscribe() {
        final long id = Thread.currentThread().getId();
        queues.remove(id);
        if (subscriberIdentifiers != null) {
            for (Iterator<Entry<Object, Long>> iterator = subscriberIdentifiers.entrySet().iterator(); iterator.hasNext(); ) {
                if (id == iterator.next().getValue()) {
                    iterator.remove();
                    break;
                }
            }
        }
    }
949770
public void unsubscribe() {
        List<InvocationHandler> handler = this.handlers.get(target);
        if (handler != null) {
            handler.remove(this.handler);
        }
    }
1004355
function () {
            /*  determine parameters  */
            var params = $cs.params("unsubscribe", arguments, {
                id: { pos: 0, req: true }
            });

            /*  detach parameters from component  */
            if (typeof this.__subscription[params.id] === "undefined")
                throw _cs.exception("unsubscribe", "subscription not found");
            delete this.__subscription[params.id];
            return;
        }
854409
function() {
      var el = this.getEl();
      
      // Unsubscribe all listeners on the updatedEvt
      this.updatedEvt.unsubscribeAll();
      
      // Purge element (remove listeners on el and childNodes recursively)
      util.Event.purgeElement(el, true);
      
      // Remove from DOM
      if(Dom.inDocument(el)) {
         el.parentNode.removeChild(el);
      }
      
   }
1361074
private void removeRegisteredProxies(Neighbour neighbour, 
      Transaction transaction,
                                       boolean wasRecovered) throws SIResourceException 
                                       
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "removeRegisteredProxies", 
        new Object[] { neighbour, transaction, new Boolean(wasRecovered) } );

    // Get all the proxies that this Neighbour has registered
    final Hashtable registeredProxies = neighbour.getRegisteredProxies();

    // Check that there is actually some proxies to remove.
    if (!registeredProxies.isEmpty())
    {
      boolean proxiesDeregistered = false;

      final Enumeration subscriptions = registeredProxies.elements();

      final ArrayList topics = new ArrayList();
      final ArrayList topicSpaces = new ArrayList();

      // Loop through each of the subscriptions that where registered and
      // remove them.
      while (subscriptions.hasMoreElements())
      {
        final MESubscription subscription =
          (MESubscription) subscriptions.nextElement();
          
        // Remove the proxy from the list of proxies for this Neighbour.
        neighbour.proxyDeregistered(subscription.getTopicSpaceUuid(), 
                                    subscription.getTopic(), 
                                    transaction);
        
        DestinationHandler destination = 
          _destinationManager.getDestinationInternal(subscription.getTopicSpaceUuid(), false); 
        
        // delete the proxy subscription
        final boolean deleted =
          deleteProxy(
            destination,
            subscription,
            neighbour,
            subscription.getTopicSpaceUuid(),
            subscription.getTopic(),
            wasRecovered,
            true);
            

        // If a PubSubOutputHandler is deleted, then add this topic and
        // topic space to the set to be fed through the topic space deleted 
        // event.   
        if (deleted)
        {          
          topics.add(subscription.getTopic());
          topicSpaces.add(subscription.getTopicSpaceUuid());

          proxiesDeregistered = true;
        }

      }

      // If there were any proxies removed, then call the proxy handler code to 
      // publish that these subscriptions have been deleted
      if (proxiesDeregistered && wasRecovered)
      {
        _proxyHandler.unsubscribeEvent(
          topicSpaces,
          topics,
          neighbour.getBusId(),
          null);
      }


    }
    else
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
        SibTr.debug(
          tc,
          "no proxies registered for neighbour " + neighbour.getUUID().toString());

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "removeRegisteredProxies");
  }
95385
def _close_event_stream(self):
        """"""
        self.__subscribed = False
        del self.__events[:]
        self.__event_handle.clear()
563823
def disconnect(self, code):
        """"""
        Subscriber.objects.filter(session_id=self.session_id).delete()
708892
function unsubscribe() {
    var _this = this;
    var dataBindings = Reflect.getMetadata(constance_1.STATEX_DATA_BINDINGS_KEY, this);
    if (dataBindings != undefined) {
        var subscriptions = dataBindings.subscriptions || [];
        subscriptions.forEach(function (item) { return item.target === _this && item.subscription != undefined && item.subscription.unsubscribe(); });
        dataBindings.subscriptions = subscriptions.filter(function (item) { return item.target !== _this; });
        Reflect.defineMetadata(constance_1.STATEX_DATA_BINDINGS_KEY, dataBindings, this);
    }
}
246580
function(datasetId) {
    if (syncSubscribers && datasetId && syncSubscribers[datasetId]) {
      syncSubscribers[datasetId].unsubscribeAll();
      delete syncSubscribers[datasetId];
    }
  }
724300
@Override
	public void removeBySubscriptionStatus(int subscriptionStatus) {
		for (CommerceSubscriptionEntry commerceSubscriptionEntry : findBySubscriptionStatus(
				subscriptionStatus, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commerceSubscriptionEntry);
		}
	}