Releases the resources held by this stream and removes it from the manager.
540914
public void dispose ()
    {
        // make sure the stream is stopped
        if (_state != AL10.AL_STOPPED) {
            stop();
        }

        // delete the source and buffers
        _source.delete();
        for (Buffer buffer : _buffers) {
            buffer.delete();
        }

        // remove from manager
        _soundmgr.removeStream(this);
    }
463782
public void free()
    {
        this.stopThisThread();
        this.freeFiltersWithListener(null);
        if (m_filterList != null)
            m_filterList.free();
        m_filterList = null;
        m_baseMessageQueue = null;
    }
870729
public void free()
    {
        if (m_messageMap != null)
        {
            for (BaseMessageQueue messageQueue : m_messageMap.values())
            {
                if (messageQueue != null)
                {       // Don't worry about removing these, since you are removing them all.
                    messageQueue.setMessageManager(null);   // Make sure it doesn't try to remove itself again
                    messageQueue.free();
                }                
            }
        }
        m_messageMap = null;
        super.free();
    }
543792
public synchronized void release()
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "release");

      super.release();

      if (poolManager != null)
      {
         poolManager.release(this);
      }

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "release");
   }
1131652
private void destroy() {
        if (queue != null) {

            if (!queue.isEmpty()) {
                logger.trace("Non-empty queue: {}", queue);

                if (releaseMessages) {
                    Object msg;
                    while ((msg = queue.poll()) != null) {
                        ReferenceCountUtil.safeRelease(msg);
                    }
                }
            }

            queue.recycle();
            queue = null;
        }
    }
798194
public void destroy() {
        if (inputStream != null)
        {
            try
            {
                inputStream.close();
            } catch (Throwable t)
            {
                LOG.warn("Error closing input stream", t);
            }
            inputStream = null;
        }
        if (outputStream != null)
        {
            try
            {
                outputStream.close();
            } catch (Throwable t)
            {
                LOG.warn("Error closing output stream", t);
            }
            outputStream = null;
        }
        if (errorStream != null)
        {
            try
            {
                errorStream.close();
            } catch (Throwable t)
            {
                LOG.warn("Error closing error stream", t);
            }
            errorStream = null;
        }
        if (ffmpeg != null)
        {
            ffmpeg.destroy();
            ffmpeg = null;
        }
        if (ffmpegKiller != null)
        {
            Runtime runtime = Runtime.getRuntime();
            runtime.removeShutdownHook(ffmpegKiller);
            ffmpegKiller = null;
        }
    }
1127601
public void freeCurrent() {
		int beforeReleaseNum = availableMemory.size();
		memManager.release(availableMemory);
		allocatedFloatingNum -= (beforeReleaseNum - availableMemory.size());
	}
1028556
def close(self):
        
        self.closed = True
        self._flush_bits_to_stream()
        self._stream.close()
1036437
void cleanup(Http2Stream stream, EmbeddedChannel compressor) {
        if (compressor.finish()) {
            for (;;) {
                final ByteBuf buf = compressor.readOutbound();
                if (buf == null) {
                    break;
                }

                buf.release();
            }
        }
        stream.removeProperty(propertyKey);
    }
849132
public void freeResources() throws IOException {
        if(reader != null) {
            reader.close();
        }
        if(servletInputStream != null) {
            servletInputStream.close();
        }
    }
1133274
public void destroy()
  {
    try {
      close();
    } catch (IOException e) {
    }

    TempCharBuffer ptr = _head;
    
    _head = null;
    _tail = null;

    TempCharBuffer.freeAll(ptr);
  }
1269153
void releaseResources(JobInstance ji)
    {
        this.peremption.remove(ji.getId());
        this.actualNbThread.decrementAndGet();

        for (ResourceManagerBase rm : this.resourceManagers)
        {
            rm.releaseResource(ji);
        }

        if (!this.strictPollingPeriod)
        {
            // Force a new loop at once. This makes queues more fluid.
            loop.release(1);
        }
        this.engine.signalEndOfRun();
    }
270420
private void remove(T resource) {
    try {
      mLock.lock();
      mResources.remove(resource);
    } finally {
      mLock.unlock();
    }
  }
633475
public function stream_close()
    {
        $this->stream_flush();
        fclose($this->fd);
        $this->path = null;
        $this->fd = null;
    }
441226
public void release() throws IOException {
    for (BufferPool.Buffer b: buffers) {
      PooledBuffers.release(b);
    }

    buffers.clear();
    count = 0;
  }
266052
private void releaseAllChannelResources() {
		for (int i = 0; i < this.inputGates.size(); i++) {
			this.inputGates.get(i).releaseAllChannelResources();
		}

		for (int i = 0; i < this.outputGates.size(); i++) {
			this.outputGates.get(i).releaseAllChannelResources();
		}
	}
77735
@Override
  public void close() throws IOException {
    try {
      mLock.lock();
      if (mAvailableResources.size() != mResources.size()) {
        LOG.warn("{} resources are not released when closing the resource pool.",
            mResources.size() - mAvailableResources.size());
      }
      for (ResourceInternal<T> resourceInternal : mAvailableResources) {
        closeResource(resourceInternal.mResource);
      }
      mAvailableResources.clear();
    } finally {
      mLock.unlock();
    }
    mGcFuture.cancel(true);
  }