/*
Releases the Reader once the obtainer has no more need for it.
970646
protected void releaseReader() {
        if (WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE){
            checkRequestObjectInUse();
        }
        if (_srtRequestHelper._gotReader) {
            if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  
                logger.logp(Level.FINE, CLASS_NAME,"releaseReader()" ,"");
            }
            _srtRequestHelper._gotReader = false;
            _srtRequestHelper._reader = null;
        }
    }
166711
public static void closeQuietly(XMLStreamReader reader) {
        if (reader != null) {
            try {
                reader.close();
            } catch (XMLStreamException e) {
                logger.warn("Error while closing", e);
            }
        }
    }
950791
@Override
  public void stop() {
    if (cancellable != null) {
      cancellable.cancel();
      cancellable = null;
    }
    
    if (reader != null) {
      reader.close();
    }
    
    super.stop();
  }
654641
public function detach(ReaderInterface $reader)
    {
        if (($key = array_search($reader, $this->readers)) !== false) {
            unset($this->readers[$key]);
        }

        // Clear any cached groups
        $this->groups = [];
    }
1127601
public void freeCurrent() {
		int beforeReleaseNum = availableMemory.size();
		memManager.release(availableMemory);
		allocatedFloatingNum -= (beforeReleaseNum - availableMemory.size());
	}
1061071
@Internal
    public void release() {
        Object body = getBody().orElse(null);
        releaseIfNecessary(body);
        for (ByteBufHolder byteBuf : receivedContent) {
            releaseIfNecessary(byteBuf);
        }
        for (ByteBufHolder byteBuf : receivedData.values()) {
            releaseIfNecessary(byteBuf);
        }
        if (this.body != null && this.body instanceof ReferenceCounted) {
            ReferenceCounted referenceCounted = (ReferenceCounted) this.body;
            releaseIfNecessary(referenceCounted);
        }
        for (Map.Entry<String, Object> attribute : attributes) {
            Object value = attribute.getValue();
            releaseIfNecessary(value);
        }
    }
1041121
@Override
  public synchronized void close() throws IOException {
    if (opened) {
      face.removeRegisteredPrefix(registrationId);
      contentStore.clear();
      announcementService.announceExit(publisherId);
    }
  }
885445
private function free()
    {
        $this->readable = false;

        if ($this->deferred !== null) {
            $deferred = $this->deferred;
            $this->deferred = null;
            $deferred->resolve();
        }

        Loop::cancel($this->watcher);

        if ($this->immediateWatcher !== null) {
            Loop::cancel($this->immediateWatcher);
        }
    }
1341800
@Override
    public void close()
    {
        if (settings != null)
        {
            settings.clear();
            settings = null;
        }

        if (connection != null)
        {
            connection.disconnect();
            connection = null;
        }

        reader = null;
    }
245233
@Override
    public void release() {
        // Don't call IOUtils.release(in, null) or else could lead to infinite loop
        IOUtils.closeQuietly(this, null);
        InputStream in = getWrappedInputStream();
        if (in instanceof Releasable) {
            // This allows any underlying stream that has the close operation
            // disabled to be truly released
            Releasable r = (Releasable)in;
            r.release();
        }
    }
642819
protected function _destroyReader()
    {
        if ($this->_reader instanceof Mage_Archive_Helper_File) {
            $this->_reader->close();
            $this->_reader = null;
        }

        return $this;
    }
549806
void release() {
    /* release current download request */
    cancelAll();

    /* release download queue */
    if (downloadQueue != null) {
      downloadQueue = null;
    }

    /* release dispathcers */
    if (dispatchers != null) {
      stop();

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

      dispatchers = null;
    }
  }
840443
@Override
	public void release() {
		super.release();
		setTypeExpr(null);
		setSrcExpr(null);
		setUseRandomParamExpr(null);
		setAsyncExpr(null);
		setDeferExpr(null);
	}
1281495
protected void releaseProxyReadBuffer() {
        WsByteBuffer buffer = connLink.getReadInterface().getBuffer();
        if (null != buffer) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Releasing proxy read buffer: " + buffer);
            }
            buffer.release();
            connLink.getReadInterface().setBuffer(null);
        }
    }
1105236
def removeReader(self, selectable):
        """"""
        try:
            if selectable.disconnected:
                self._reads[selectable].kill(block=False)
                del self._reads[selectable]
            else:
                self._reads[selectable].pause()
        except KeyError:
            pass
1366722
public void release() {
        if (file != null) {
            file.setWritable(true);
        }
        if (savedFile != null) {
            savedFile.setWritable(true);
        }
    }
44831
async def _maybe_release_last_part(self) -> None:
        """"""
        if self._last_part is not None:
            if not self._last_part.at_eof():
                await self._last_part.release()
            self._unread.extend(self._last_part._unread)
            self._last_part = None