Package io.netty.util.internal
Interface CleanableDirectBuffer
-
public interface CleanableDirectBufferEncapsulates a directByteBufferand its mechanism for immediate deallocation, if any.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ByteBufferbuffer()Get the buffer instance.voidclean()Deallocate the buffer.
-
-
-
Method Detail
-
buffer
ByteBuffer buffer()
Get the buffer instance.Note: the buffer must not be accessed after the
clean()method has been called.- Returns:
- The
ByteBufferinstance.
-
clean
void clean()
Deallocate the buffer. This method can only be called once per instance, and all usages of the buffer must have ceased before this method is called, and the buffer must not be accessed again after this method has been called.
-
-