This method de-registers all former registered services.
487390
private void deregisterServices() {
	Iterator<ServiceRegistration<?>> serviceIterator = serviceRegistrations.iterator();
	while (serviceIterator.hasNext()) {
	    ServiceRegistration<?> serviceReference = serviceIterator.next();
	    serviceReference.unregister();
	    serviceIterator.remove();
	}
    }
968582
def clean(self):
        
        to_del = []
        for serv in self:
            if not serv.host:
                to_del.append(serv.uuid)
        for service_uuid in to_del:
            del self.items[service_uuid]
986618
public void unregisterProvider(Object provider) {
		if (provider != null) {
			Collection<Object> providerList = new ArrayList<>(1);
			providerList.add(provider);
			unregisterProviders(providerList);
		}
	}
1157238
public static void removeAllProviders() {
        Provider[] provider_list = Security.getProviders();

        for (int i = 0; i < provider_list.length; i++) {
            if (provider_list[i] != null) {
                String name = provider_list[i].getName();
                if (name != null) {
                    Security.removeProvider(name);
                }
            }
        }
    }
138237
public void removeService(ServiceReference reference, Object service) {
        if (serviceRegistration != null) {
            serviceRegistration.unregister();
            serviceRegistration = null;
        }

        String alias = this.getAlias();
        ((HttpService) service).unregister(alias);
        if (servlet instanceof WebappServlet)
            ((WebappServlet)servlet).free();
        servlet = null;
    }
849659
def unregister(self, svc_ref):
        # type: (ServiceReference) -> Any
        
        with self.__svc_lock:
            try:
                # Try in pending services
                return self.__pending_services.pop(svc_ref)
            except KeyError:
                # Not pending: continue
                pass

            if svc_ref not in self.__svc_registry:
                raise BundleException("Unknown service: {0}".format(svc_ref))

            # Get the owner
            bundle = svc_ref.get_bundle()

            # Get the service instance
            service = self.__svc_registry.pop(svc_ref)

            for spec in svc_ref.get_property(OBJECTCLASS):
                spec_services = self.__svc_specs[spec]
                # Use bisect to remove the reference (faster)
                idx = bisect.bisect_left(spec_services, svc_ref)
                del spec_services[idx]
                if not spec_services:
                    del self.__svc_specs[spec]

            # Remove the service factory
            if svc_ref.is_factory():
                # Call unget_service for all client bundle
                factory, svc_reg = self.__svc_factories.pop(svc_ref)
                for counter in self.__factory_usage.values():
                    counter.cleanup_service(factory, svc_reg)
            else:
                # Delete bundle association
                bundle_services = self.__bundle_svc[bundle]
                bundle_services.remove(svc_ref)
                if not bundle_services:
                    # Don't keep empty lists
                    del self.__bundle_svc[bundle]

            return service
1305611
def restore_used_registers(self):
        """"""
        used = self.used_registers_stack.pop()
        self.used_registers = used[:]
        used.sort(reverse = True)
        for reg in used:
            self.newline_text("POP \t%s" % SharedData.REGISTERS[reg], True)
            self.free_registers.remove(reg)
937779
def clear(self):
        
        self.services.clear()
        self._future_value.clear()

        self.services = None
        self._lock = None
        self._ipopo_instance = None
        self._context = None
        self.requirement = None
        self._key = None
        self._allow_none = None
        self._future_value = None
        self._field = None
265745
public void deactivateAll() {
        for (String scheme : new String[] {"http", "https"}) {
            InetSocketAddress originalProxy = originalProxies.remove(scheme);
            if (originalProxy != null) {
                System.setProperty(scheme + ".proxyHost", originalProxy.getHostName());
                System.setProperty(scheme + ".proxyPort", Integer.toString(originalProxy.getPort()));
            } else {
                System.clearProperty(scheme + ".proxyHost");
                System.clearProperty(scheme + ".proxyPort");
            }
        }

        if (originalNonProxyHosts.isEmpty()) {
            System.clearProperty("http.nonProxyHosts");
        } else {
            System.setProperty("http.nonProxyHosts", Joiner.on('|').join(originalNonProxyHosts));
        }
        originalNonProxyHosts.clear();
    }
514754
def _callbacks_cleanup(cnx, callback_ids):
    '''
    
    '''
    for obj, ids in callback_ids.items():
        register_name = REGISTER_FUNCTIONS[obj]
        deregister_name = register_name.replace('Reg', 'Dereg')
        deregister = getattr(cnx, deregister_name)
        for callback_id in ids:
            deregister(callback_id)
1064521
def clear(self):
        
        with self.__svc_lock:
            self.__svc_registry.clear()
            self.__svc_factories.clear()
            self.__svc_specs.clear()
            self.__bundle_svc.clear()
            self.__bundle_imports.clear()
            self.__factory_usage.clear()
            self.__pending_services.clear()
322225
def _unregister_all_factories(self):
        
        factories = list(self.__factories.keys())
        for factory_name in factories:
            self.unregister_factory(factory_name)
1242711
private void unregisterAllServlets() {

        for (String endpoint : registeredServlets) {
            registeredServlets.remove(endpoint);
            web.unregister(endpoint);
            LOG.info("endpoint {} unregistered", endpoint);
        }

    }
906693
public void unregister() {
    context.unregisterReceiver(networkConnectionChangeReceiver);
    context.unregisterReceiver(internetConnectionChangeReceiver);
    if (wifiAccessPointsScanEnabled) {
      context.unregisterReceiver(wifiSignalStrengthChangeReceiver);
    }
  }
101810
public void dispose() {
        synchronized (this) {
            if (serviceRegistration == null) {
                throw new IllegalStateException(String.format("%s [%s] had not been registered.", getClass()
                    .getSimpleName(), this));
            }
            serviceRegistration.unregister();
            serviceRegistration = null;
        }
    }
522955
private function unregister() {
        if ($this->db) {
            $this->db->recordset_closed($this);
            $this->db = null;
        }
    }
755728
@Invalidate
    public void stop(){
        for(ServiceRegistration registration: registrations){
            registration.unregister();
        }
        registrations.clear();
        names.clear();
    }