Release the potential buffer that were created
162530
public void close() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "close, vc=" + getVCHash());
        }

        synchronized (closeSync) {
            if (closeCalled) {
                return;
            }

            closeCalled = true;
            if (null != this.netBuffer) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                    Tr.event(tc, "Releasing netBuffer during close "
                                 + SSLUtils.getBufferTraceInfo(netBuffer));
                }
                this.netBuffer.release();
                this.netBuffer = null;
            }

            cleanupDecBuffers();
            if (unconsumedDecData != null) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                    Tr.event(tc, "Releasing unconsumed decrypted buffers, "
                                 + SSLUtils.getBufferTraceInfo(unconsumedDecData));
                }
                WsByteBufferUtils.releaseBufferArray(unconsumedDecData);
                unconsumedDecData = null;
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "close");
        }
    }
643652
protected void releasing(ByteBuffer buffer) {
        if (buffer != null && buffer.isDirect()) {
            DirectByteBufferHelper directByteBufferHelper = this.directByteBufferHelper.get();
            if (directByteBufferHelper != null) {
                directByteBufferHelper.releaseDirectByteBuffer(buffer);
            }
        }
    }
1120371
private void advanceBufferIfNecessary() {
    ReadableBuffer buffer = buffers.peek();
    if (buffer.readableBytes() == 0) {
      buffers.remove().close();
    }
  }
913419
public void cleanup() {
        state = null;
        if (headerBuffer != null) {
            bufferPool.deallocate(headerBuffer);
        }
        if (dataBuffer != null) {
            bufferPool.deallocate(dataBuffer);
        }
    }
1111650
public void releaseBuffers() {
        // release buffers is desired
        if (payloadBuffers != null) {
            if (tc.isDebugEnabled()) {
                Tr.debug(tc, "release payload buffers.  number to release is: " + payloadCountOfBuffers);
            }
            // if the payload buffers have been set into here, then release those
            for (int i = 0; i < payloadCountOfBuffers; i++) {
                payloadBuffers[i].release();
            }
            // avoid double releasing by resetting these objects and variables
            payloadBuffers = null;
            payloadCountOfBuffers = 0;
        } else {
            if (tc.isDebugEnabled()) {
                Tr.debug(tc, "release buffers from frame list.  number to release is: " + countOfIOFrames);
            }
            // payload buffers haven't been set into here yet, so release buffers on each frame processor
            if (countOfIOFrames > 0) {
                for (int i = 0; i < countOfIOFrames; i++) {
                    fpList[i].releaseBuffers();
                }
            } else {
                frameProcessor.releaseBuffers();
            }
        }
    }
1176787
void close() {
    acquireExclusiveLock();
    try {

      if (buffer != null) {
        if (dirty)
          buffer.force();

        if (sunClass != null) {
          // USE SUN JVM SPECIAL METHOD TO FREE RESOURCES
          try {
            final Method m = sunClass.getMethod("cleaner");
            final Object cleaner = m.invoke(buffer);
            cleaner.getClass().getMethod("clean").invoke(cleaner);
          } catch (Exception e) {
            OLogManager.instance().error(this, "Error on calling Sun's MMap buffer clean", e);
          }
        }

        buffer = null;
      }
      counter = 0;
      file = null;

    } finally {
      releaseExclusiveLock();
    }
  }
914367
def close(self, ulBuffer):
        """"""

        fn = self.function_table.close
        result = fn(ulBuffer)
        return result
683521
public void clearBuffer()
    {
        super.clearBuffer();
        if (m_vector == null)
            m_vector = new Vector<Object>();
        else
            m_vector.removeAllElements();
        m_iCurrentIndex = 0;
    }
447600
def __clear_in_buffer(self):
        
        self.__in_buffer.value = bytes(b'\0' * len(self.__in_buffer))
429015
public void resetBuffer()
    {
        if (isCommitted())
            throw new IllegalStateException("Committed");
        
        ((HttpOutputStream)_httpResponse.getOutputStream()).resetBuffer();
        if (_writer!=null) _writer.reset();
    }
1169346
def clear(self, fill = 0x00):
        
        self._buffer = [ fill ] * ( self.width * self.height )
1120123
private static void free(ByteBuffer buf) {
        Cleaner cleaner = ((DirectBuffer)buf).cleaner();
        if (cleaner != null) {
            cleaner.clean();
        }
    }
149144
def pop_discard_buffer
      raise Shells::NotRunning unless running?
      # a standard pop discarding current data and retrieving the history.
      debug 'Discarding buffer <<'
      sync do
        hist_stdout, hist_stderr, hist_output = (output_stack.pop || [])
        self.stdout = hist_stdout || ''
        self.stderr = hist_stderr || ''
        self.output = hist_output || ''
      end
    end
565310
public static void releaseBuffer(Object message, RequestContext ctx) {
        final IdentityHashMap<Object, ByteBuf> buffers = ctx.attr(BUFFERS).get();
        checkState(buffers != null,
                   "Releasing buffer even though storeBuffer has not been called.");
        final ByteBuf removed = buffers.remove(message);
        if (removed == null) {
            throw new IllegalArgumentException("The provided message does not have a stored buffer.");
        }
        removed.release();
    }
1145319
public static void clearToFill(ByteBuffer buffer) {
        if (buffer != null) {
            buffer.position(0);
            buffer.limit(buffer.capacity());
        }
    }
771412
public void unpin(Buffer buff) {
		BlockId blk = buff.block();
		PinnedBuffer pinnedBuff = pinnedBuffers.get(blk);
		
		if (pinnedBuff != null) {
			pinnedBuff.pinnedCount--;
			
			if (pinnedBuff.pinnedCount == 0) {
				bufferPool.unpin(buff);
				pinnedBuffers.remove(blk);
				
				synchronized (bufferPool) {
					bufferPool.notifyAll();
				}
			}
		}
	}
196258
public void unlockBuffer() throws IllegalStateException {
        int locks = lockCount.decrementAndGet();
        if (locks < 0) {
            throw new IllegalStateException(
                "Buffer not locked or released already.");
        }
        if (locks == 0) {
            if (linkedTo != null) {
                backing = savedBacking;
                linkedTo.unlockBuffer();
                linkedTo = null;
            }
            manager.recollect(this);
        }
    }