public final class ReflectionAllocator extends java.lang.Object implements BufferAllocator
Constructor and Description |
---|
ReflectionAllocator() |
Modifier and Type | Method and Description |
---|---|
java.nio.ByteBuffer |
allocate(int size)
Allocate a direct ByteBuffer of the specified size.
|
void |
destroyDirectBuffer(java.nio.Buffer toBeDestroyed)
This function explicitly calls the Cleaner method of a direct buffer.
|
public void destroyDirectBuffer(java.nio.Buffer toBeDestroyed)
destroyDirectBuffer
in interface BufferAllocator
toBeDestroyed
- The direct buffer that will be "cleaned". Utilizes reflection.public java.nio.ByteBuffer allocate(int size)
BufferAllocator
allocate
in interface BufferAllocator
size
- in bytes (≥0)