cleans recorder registry and removes itself from BuildListener list.
485582
private function cleanup()
    {
        $entries = self::$recorderEntries;
        foreach ($entries as $key => $entry) {
            if ($entry->getProject() == $this->getProject()) {
                unset(self::$recorderEntries[$key]);
            }
        }
        $this->getProject()->removeBuildListener($this);
    }
1051758
void removeAllEventListeners() {
        for (JcrListenerAdapter adapter : this.listeners) {
            assert (adapter != null);
            this.repositoryObservable.unregister(adapter);
        }
        this.listeners.clear();
    }
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()
147963
private void cleanLogFilesIfNecessary() {
    File logDir = new File(folderPath);
    File[] files = logDir.listFiles();
    if (files == null) {
      return;
    }
    for (File file : files) {
      if (cleanStrategy.shouldClean(file)) {
          file.delete();
      }
    }
  }
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
156916
def remove_listener(self, listener):
        
        self.logger.debug('discarding listener %r', listener)
        with self._lock:
            self._listeners.discard(listener)
1264205
function cleanup() {
      res.removeListener('finish', sendStats);
      res.removeListener('error', cleanup);
      res.removeListener('close', cleanup);
    }
31043
def cleanup_logger(self):
        
        self.log_handler.close()
        self.log.removeHandler(self.log_handler)
320681
function cleanupProxyOnDestroy (object) {
      if (api.mediaCapturer && api.mediaCapturer.id === object.id) {
        api.mediaCapturer = null;
      }
      else if (proxies.hasOwnProperty(object.id)) {
        delete proxies[object.id];
      }

      if (object.$) {
        object.$.remove();
      }
    }
1077275
private void removeLastEntry() {
    Entry<E> entry = indexToEntry.remove(size() - 1);
    keyToEntry.remove(entry.key);
  }
1357026
def cleanup(self):
		
		for task in self.__done_registry:
			task.stop()
		self.__done_registry.clear()
		self.cleanup_event().clear()
790269
def clean(self):
        
        logger.info('Cleaning up archive')
        shutil.move(
            os.path.join(
                self.data_dir,
                'var/IRS/data/scripts/pofd/download/FullDataFile.txt'
            ),
            self.final_path
        )

        shutil.rmtree(os.path.join(self.data_dir, 'var'))
        os.remove(self.zip_path)
1010339
def remove_listener(self, registration_id):
        
        try:
            self._listeners.pop(registration_id)
            return True
        except KeyError:
            return False
948176
function () {
      this.idle();

      delete this.recording;

      this.recording = new Recording({
        timeBetweenLoops:       this.options.timeBetweenLoops,
        loop:                   this.options.loop,
        requestProtocolVersion: this.controller.connection.opts.requestProtocolVersion,
        serviceVersion:         this.controller.connection.protocol.serviceVersion
      });

      this.controller.emit('playback.stop', this);
    }
936204
public void removeAllAppenders() {
        ListIterator<Appender> ite = appenderList.listIterator();
        while (ite.hasNext()) {
            Appender appender = ite.next();
            if (appender != null && appender.isLogOpen()) {
                try {
                    appender.close();
                } catch (IOException e) {
                    Log.e(TAG, "Failed to close appender. " + e);
                }
            }
        }
        appenderList.clear();
    }
611966
public void removeListeners() {
        if (globalListener != null) {
            try {
                InvokerHelper.invokeMethod(currentObject, "removePropertyChangeListener", globalListener);
            } catch (Exception e) {
                //LOGME ignore the failure
            }
            globalListener = null;
        }
        if (localListener != null) {
            try {
                InvokerHelper.invokeMethod(currentObject, "removePropertyChangeListener", new Object[] {propertyName, localListener});
            } catch (Exception e) {
                //LOGME ignore the failure
            }
            localListener = null;
        }
        if (syntheticFullBinding != null) {
            syntheticFullBinding.unbind();
        }
    }
248429
void unregister(ResourceMonitorImpl monitorImpl)
   {
      Set<Entry<WatchKey, ResourceMonitorImpl>> entrySet = keys.entrySet();
      Iterator<Entry<WatchKey, ResourceMonitorImpl>> iterator = entrySet.iterator();
      while (iterator.hasNext())
      {
         Entry<WatchKey, ResourceMonitorImpl> next = iterator.next();
         if (next.getValue() == monitorImpl)
         {
            next.getKey().cancel();
            iterator.remove();
         }
      }
   }