Package org.apache.pekko.io
Class DirectByteBufferPool$
java.lang.Object
org.apache.pekko.io.DirectByteBufferPool$
INTERNAL API
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DirectByteBufferPool$
Static reference to the singleton instance of this Scala object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
tryCleanDirectByteBuffer
(ByteBuffer byteBuffer) DirectByteBuffers are garbage collected by using a phantom reference and a reference queue.
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
DirectByteBufferPool$
public DirectByteBufferPool$()
-
-
Method Details
-
tryCleanDirectByteBuffer
DirectByteBuffers are garbage collected by using a phantom reference and a reference queue. Every once a while, the JVM checks the reference queue and cleans the DirectByteBuffers. However, as this doesn't happen immediately after discarding all references to a DirectByteBuffer, it's easy to OutOfMemoryError yourself using DirectByteBuffers. This function explicitly calls the Cleaner method of a DirectByteBuffer.
-