Remove the LogHandler ref.
547326
public void unsetWsTraceHandler(String id, WsTraceHandler ref) {
        if (id != null) {
            if (ref == null) {
                wsTraceHandlerServices.remove(id);
            } else {
                wsTraceHandlerServices.remove(id, ref);
            }
        }
    }
1157702
public void removeAndCreateNewLog() {
		logMgrLock.lock();
		try {
			VanillaDb.fileMgr().delete(logFile);
			
			// Reset all the data
			lastLsn = LogSeqNum.DEFAULT_VALUE;
			lastFlushedLsn = LogSeqNum.DEFAULT_VALUE;
			
			// 'myPage', 'currentBlk' and 'currentPos' are reset in this method
			appendNewBlock();
		} finally {
			logMgrLock.unlock();
		}
	}
360080
def remove_file_handlers(logger=None):
    
    if not isinstance(logger, logging.Logger):
        logger = logging.getLogger(logger)

    new_handlers = []
    for handler in logger.handlers:
        if isinstance(handler, logging.FileHandler):
            handler.close()
        else:
            new_handlers.append(handler)
    logger.handlers = new_handlers
879880
public void unsetWsLogHandler(String id, WsLogHandler ref) {
        if (id != null) {
            if (ref == null) {
                wsLogHandlerServices.remove(id);
            } else {
                wsLogHandlerServices.remove(id, ref);
            }
        }
    }
447183
def removeHandler(self, event_name):
        """"""
        if event_name not in self.handlers:
            raise ValueError('{} is not a valid event'.format(event_name))
        self.handlers[event_name] = None
630382
synchronized void removeHandler(ServiceReference<?> serviceReference) {
        HandlerHolder holder = serviceReferenceMap.remove(serviceReference);

        if (holder != null) {
            for (String topic : holder.getDiscreteTopics()) {
                removeTopicHandlerFromMap(topic, holder, discreteEventHandlers);
            }
            for (String topic : holder.getWildcardTopics()) {
                removeTopicHandlerFromMap(topic, holder, wildcardEventHandlers);
            }
        }

        // Clear the cache since it's no longer up to date
        clearTopicDataCache();
    }
993549
def unbind_handler(self, svc_ref):
        
        if svc_ref not in self._bound_references:
            # Unknown reference
            return False

        # Unregister its commands
        namespace, commands = self._reference_commands[svc_ref]
        for command in commands:
            self.unregister(namespace, command)

        # Release the service
        self._context.unget_service(svc_ref)
        del self._bound_references[svc_ref]
        del self._reference_commands[svc_ref]
        return True
828182
protected void removeMsgFromLogHandler(String msgId, String handlerId) {
        Set<String> logHandlerIdSet = getOrCreateLogHandlerIdSet(msgId);
        logHandlerIdSet.remove(handlerId);
    }
1174840
def remove_callback(self, handle):
        """"""
        if self._poll is None:
            raise RuntimeError('poll instance is closed')
        remove_callback(self, handle)
        if handle.extra & READABLE:
            self._readers -= 1
        if handle.extra & WRITABLE:
            self._writers -= 1
        self._sync()
540234
def __remove_handler_factory(self, svc_ref):
        # type: (ServiceReference) -> None
        
        with self.__handlers_lock:
            # Get the handler ID
            handler_id = svc_ref.get_property(handlers_const.PROP_HANDLER_ID)

            # Check if this is the handler we use
            if svc_ref not in self._handlers_refs:
                return

            # Clean up
            self.__context.unget_service(svc_ref)
            self._handlers_refs.remove(svc_ref)
            del self._handlers[handler_id]

            # List the components using this handler
            to_stop = set()  # type: Set[StoredInstance]
            for factory_name in self.__factories:
                _, factory_context = self.__get_factory_with_context(
                    factory_name
                )
                if handler_id in factory_context.get_handlers_ids():
                    to_stop.update(self.__get_stored_instances(factory_name))

            with self.__instances_lock:
                for stored_instance in to_stop:
                    # Extract information
                    context = stored_instance.context
                    name = context.name
                    instance = stored_instance.instance

                    # Clean up the stored instance (iPOPO side)
                    del self.__instances[name]
                    stored_instance.kill()

                    # Add the component to the waiting queue
                    self.__waiting_handlers[name] = (context, instance)

            # Try to find a new handler factory
            new_ref = self.__context.get_service_reference(
                handlers_const.SERVICE_IPOPO_HANDLER_FACTORY,
                "({0}={1})".format(handlers_const.PROP_HANDLER_ID, handler_id),
            )
            if new_ref is not None:
                self.__add_handler_factory(new_ref)
198175
def unhandle(self, handler):
        
        with self._hlock:
            try:
                self._handler_list.remove(handler)
            except ValueError:
                raise ValueError("Handler is not handling this event, so cannot unhandle it.")
        return self
1312392
public static synchronized void removeLogger(@NonNull JobLogger logger) {
        for (int i = 0; i < loggers.length; i++) {
            if (logger.equals(loggers[i])) {
                loggers[i] = null;
                // continue, maybe for some reason the logger is twice in the array
            }
        }
    }
1070748
protected function tearDown()
    {
        if ($this->_logger->isHandling(ehough_epilog_Logger::DEBUG)) {

            $this->_logger->debug('Closing cURL');
        }

        if (isset($this->_handle)) {

            curl_close($this->_handle);
            unset($this->_handle);
        }
    }
1048006
def stop(self):
		
		if WAppsGlobals.log is not None and WLogApp.__log_handler__ is not None:
			WAppsGlobals.log.removeHandler(WLogApp.__log_handler__)

		WLogApp.__log_handler__ = None
		WAppsGlobals.log = None
1011802
void clear() {

        // This is volatile, read once for performance.
        final String name = loggerName;
        if (name != null) {
            CHANGE_LOGGER_CONTEXT_LOCK.lock();
            try {
                loggerContext.stop();

                final Logger logger = loggerContext.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);
                logger.detachAndStopAllAppenders();

                // Additional cleanup/reset for this name
                configureLoggers(name);
            } finally {
                CHANGE_LOGGER_CONTEXT_LOCK.unlock();
            }

            StatusPrinter.setPrintStream(System.out);
        }
    }
1102641
public void setLogHandler(String id, LogHandler ref) {
        if (id != null && ref != null) {
            logHandlerServices.put(id, ref);
        }
    }
1152978
def clear(self):
        
        self._logger.debug("Component handlers are cleared")

        # Clean up everything to avoid stale references, ...
        self._field = None
        self._name = None
        self._logger = None