Example usage for io.netty.buffer AbstractReferenceCountedByteBuf release

List of usage examples for io.netty.buffer AbstractReferenceCountedByteBuf release

Introduction

In this page you can find the example usage for io.netty.buffer AbstractReferenceCountedByteBuf release.

Prototype

@Override
    public boolean release(int decrement) 

Source Link

Usage

From source file:com.noctarius.tengi.buffer.ByteBufMemoryBuffer.java

License:Open Source License

@Override
public void free() {
    if (byteBuffer instanceof AbstractReferenceCountedByteBuf) {
        // Force a releasing of the underlying ByteBuf
        AbstractReferenceCountedByteBuf byteBuf = (AbstractReferenceCountedByteBuf) byteBuffer;
        byteBuf.release(byteBuf.refCnt());
    }/*from  ww w .  jav a  2 s .co m*/
}