public class LWJGLBufferAllocator extends java.lang.Object implements BufferAllocator
BufferAllocator
which use MemoryUtil
to manage memory.Modifier and Type | Class and Description |
---|---|
static class |
LWJGLBufferAllocator.ConcurrentLWJGLBufferAllocator
Threadsafe implementation of the
LWJGLBufferAllocator . |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROPERTY_CONCURRENT_BUFFER_ALLOCATOR |
Constructor and Description |
---|
LWJGLBufferAllocator() |
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 buffer)
De-allocate a direct buffer.
|
public static final java.lang.String PROPERTY_CONCURRENT_BUFFER_ALLOCATOR
public void destroyDirectBuffer(java.nio.Buffer buffer)
BufferAllocator
destroyDirectBuffer
in interface BufferAllocator
buffer
- the buffer to de-allocate (not null)public java.nio.ByteBuffer allocate(int size)
BufferAllocator
allocate
in interface BufferAllocator
size
- in bytes (≥0)