Cleanup the context, after the loop ended.
344608
def stop(self):
        
        if self._stack:
            try:
                self._stack.teardown()
            except Exception:
                self.fatal(sys.exc_info())

        super().stop()
1080741
def cleanup(self):
        """"""
        self.parser = None
        self.request = None
        self.url = None
        self.headers = None
        self._request_handler_task = None
        self._request_stream_task = None
        self._total_request_size = 0
        self._is_stream_handler = False
311674
def cleanup(self):
        
        self.lock.acquire()
        logger.debug('Acquired lock in cleanup for ' + str(self))
        self.children = [child for child in self.children if child.is_alive()]
        self.lock.release()
392390
protected function cleanUp()
    {
        $files = glob(__DIR__.DIRECTORY_SEPARATOR.'Mapping'.DIRECTORY_SEPARATOR.'{DataType,Property,Type}'.DIRECTORY_SEPARATOR.'*.php', GLOB_BRACE);
        foreach ($files as $file) {
            unlink($file);
        }
    }
1034359
def cleanup():
    """"""
    if _output_dir and os.path.exists(_output_dir):
        log.msg_warn("Cleaning up output directory at '{output_dir}' ..."
                     .format(output_dir=_output_dir))
        if not _dry_run:
            shutil.rmtree(_output_dir)
172499
public static void reset() {
		if (DebugUtil.isDebugFeaturesEnabled()) {
			UIContext context = getCurrent();
			ALL_ACTIVE_CONTEXTS.remove(context);
		}

		CONTEXT_STACK.remove();
	}
2113
void cleanup() throws IOException {
    serverSocket.close();
    try {
      downlink.close();
    } catch (InterruptedException ie) {
      Thread.currentThread().interrupt();
    }      
  }
197065
def remove_context(self, name):
        
        self._context(name)
        del self.contexts[name]
        self._flush_tools()
572188
private void cleanupIfNeccessary(JsonGetterContext excluded) {
        int cacheCount;
        while ((cacheCount = internalCache.size()) > maxContexts) {
            int sampleCount = Math.max(cacheCount - maxContexts, cleanupRemoveAtLeastItems) + 1;
            for (SamplingEntry sample: internalCache.getRandomSamples(sampleCount)) {
                if (excluded != sample.getEntryValue()) {
                    internalCache.remove(sample.getEntryKey());
                }
            }
        }
    }
885716
function after (count, callback, context) {
  var runCount = 0
  var rests = []
  context = context || this
  return function () {
    runCount++
    if (runCount <= count) {
      rests.push(arguments[0])
    }
    if (runCount >= count) {
      callback.apply(context, [rests].concat(arraySlice(arguments)))
    }
  }
}
278018
function cleanUp() {
    if (done) return
    done = true

    wsConn.removeListener("message", onMessage)
    wsConn.removeListener("close",   onClose)
    wsConn.removeListener("error",   onError)
  }
1305758
public void cleanup() {
    htDictionary.clear();
    memoryEstimate.decrementTotalMemory(byteArray.getSizeInBytes());
    memoryEstimate.decrementTotalMemory(getSizeOfIntArrays());
    memoryEstimate.decrementDictionaryMemory(byteArray.size());
  }
127968
@Override
    public void afterEach(ExtensionContext context) {
        context.getStore(MOCKITO).remove(SESSION, MockitoSession.class)
                .finishMocking();
    }
1157985
def _clear_context(context):
    '''
    
    '''
    for var in (x for x in __context__ if x.startswith('chocolatey.')):
        context.pop(var)
338258
def cleanup(self):
        """"""
        if self.data.hooks and len(self.data.hooks.cleanup) > 0:
            env = self.data.env_list[0].copy()
            env.update({'PIPELINE_RESULT': 'SUCCESS', 'PIPELINE_SHELL_EXIT_CODE': '0'})
            config = ShellConfig(script=self.data.hooks.cleanup, model=self.model,
                                 env=env, dry_run=self.options.dry_run,
                                 debug=self.options.debug, strict=self.options.strict,
                                 temporary_scripts_path=self.options.temporary_scripts_path)
            cleanup_shell = Bash(config)
            for line in cleanup_shell.process():
                yield line
1345911
def finish(self):
        """"""

        self.unset_env()
        self.cov.stop()
        self.cov.combine()
        self.cov.save()
        node_desc = self.get_node_desc(sys.platform, sys.version_info)
        self.node_descs.add(node_desc)
1171531
protected void cleanUp() {

        m_importResource = null;
        m_importZip = null;
        m_report = null;
        m_linkStorage = null;
        m_linkPropertyStorage = null;
        m_groupsToCreate = null;
        m_cms = null;
    }