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)
BufferAllocatordestroyDirectBuffer in interface BufferAllocatorbuffer - the buffer to de-allocate (not null)public java.nio.ByteBuffer allocate(int size)
BufferAllocatorallocate in interface BufferAllocatorsize - in bytes (≥0)