Request to release all resources
165096
function() {
            graph.off('changed', onGraphChanged);
            for (var i=0;i<physicsSimulators.length; i++) {
                physicsSimulators[i].off('stable', onStableChanged);
            }
        }
205384
private void closeAll(){
        Feeder feeder = this;
        while(feeder.parent!=null)
            feeder = feeder.parent;
        while(feeder!=null){
            try{
                if(feeder.channel!=null)
                    feeder.channel.close();
            }catch(IOException ignore){
                // ignore
            }
            feeder = feeder.child;
        }
    }
1311929
def _release_all(self):
        """"""
        for i in self.inputs:
            i.call_release(True)
        self.available_lock.release()
533151
public void release() 
    { 
        if (!_hasAcquired)
            return;

        // Deliver the onRelease event to the registered listeners
        for (ResourceEvents resourceListener : _listeners)
            resourceListener.onRelease();

        // Unregister this ResourceContext with associated container context
        _containerContext.removeResourceContext(this, _bean);

        // Reset the flag to indicate resources have been released.
        _hasAcquired = false;
    }
1139021
private void releaseNetworkResources() {
		LOG.debug("Release task {} network resources (state: {}).", taskNameWithSubtask, getExecutionState());

		for (ResultPartition partition : producedPartitions) {
			taskEventDispatcher.unregisterPartition(partition.getPartitionId());
			if (isCanceledOrFailed()) {
				partition.fail(getFailureCause());
			}
		}

		closeNetworkResources();
	}
8617
void release() {
		if (mCurrentRequests != null) {
			synchronized (mCurrentRequests) {
				mCurrentRequests.clear();
				mCurrentRequests = null;
			}
		}

		if (mDownloadQueue != null) {
			mDownloadQueue = null;
		}

		if (mDownloadDispatchers != null) {
			stop();

			for (int i = 0; i < mDownloadDispatchers.length; i++) {
				mDownloadDispatchers[i] = null;
			}
			mDownloadDispatchers = null;
		}

	}
1221333
def clean_all(self, args):
        """"""
        self.clean_dists(args)
        self.clean_builds(args)
        self.clean_download_cache(args)
794979
def teardown(self):
        
        self.containers._teardown()
        self.networks._teardown()
        self.volumes._teardown()

        # We need to close the underlying APIClient explicitly to avoid
        # ResourceWarnings from unclosed HTTP connections.
        self._client.api.close()
1091676
def stop(self):
        

        instance_status = Instance.InstanceStatus(status='Terminated')
        xml_content = instance_status.serialize()

        headers = {'Content-Type': 'application/xml'}
        self._client.put(self.resource(), xml_content, headers=headers)
1173873
public void releaseDbResources()
    {
        Iterator it = m_rsIterators.iterator();
        while (it.hasNext())
        {
            ((OJBIterator) it.next()).releaseDbResources();
        }
    }
98035
def set_off(self):
        """"""
        try:
            request = requests.post(
                '{}/{}/{}/'.format(self.resource, URI, self._mac),
                data={'action': 'off'}, timeout=self.timeout)
            if request.status_code == 200:
                pass
        except requests.exceptions.ConnectionError:
            raise exceptions.MyStromConnectionError()
496904
def teardown(self):
        
        while self._http_clients:
            self._http_clients.pop().close()
        if self.created:
            self.halt()
1371782
@Override
	void releaseAllResources() throws IOException {
		if (isReleased.compareAndSet(false, true)) {

			// Gather all exclusive buffers and recycle them to global pool in batch, because
			// we do not want to trigger redistribution of buffers after each recycle.
			final List<MemorySegment> exclusiveRecyclingSegments = new ArrayList<>();

			synchronized (receivedBuffers) {
				Buffer buffer;
				while ((buffer = receivedBuffers.poll()) != null) {
					if (buffer.getRecycler() == this) {
						exclusiveRecyclingSegments.add(buffer.getMemorySegment());
					} else {
						buffer.recycleBuffer();
					}
				}
			}
			synchronized (bufferQueue) {
				bufferQueue.releaseAll(exclusiveRecyclingSegments);
			}

			if (exclusiveRecyclingSegments.size() > 0) {
				inputGate.returnExclusiveSegments(exclusiveRecyclingSegments);
			}

			// The released flag has to be set before closing the connection to ensure that
			// buffers received concurrently with closing are properly recycled.
			if (partitionRequestClient != null) {
				partitionRequestClient.close(this);
			} else {
				connectionManager.closeOpenChannelConnections(connectionId);
			}
		}
	}
137876
private void stop() {
		for (int i = 0; i < mDownloadDispatchers.length; i++) {
			if (mDownloadDispatchers[i] != null) {
				mDownloadDispatchers[i].quit();
			}
		}
	}
801243
def _finalCleanup(self):
        
        for conn in self._connections.values():
            conn.releaseConnectionResources()
        assert not self._connections
1252200
def shutdown_all(self):
        
        self._lock.acquire()
        try:
            for context in list(self._key_by_context):
                self._shutdown_unlocked(context)
        finally:
            self._lock.release()
1285120
def purge(context, resource, **kwargs):
    """"""
    uri = '%s/%s/purge' % (context.dci_cs_api, resource)
    if 'force' in kwargs and kwargs['force']:
        r = context.session.post(uri, timeout=HTTP_TIMEOUT)
    else:
        r = context.session.get(uri, timeout=HTTP_TIMEOUT)
    return r