Package com.jme3.util
Class PrimitiveAllocator
java.lang.Object
com.jme3.util.PrimitiveAllocator
- All Implemented Interfaces:
BufferAllocator
Allocate direct buffers without special logic. This should work on any JVM.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionallocate
(int size) Allocate a direct ByteBuffer of the specified size.void
destroyDirectBuffer
(Buffer toBeDestroyed) De-allocate a direct buffer.
-
Constructor Details
-
PrimitiveAllocator
public PrimitiveAllocator()Instantiate an allocator.This no-arg constructor was made explicit to avoid javadoc warnings from JDK 18+.
-
-
Method Details
-
destroyDirectBuffer
De-allocate a direct buffer. Not supported!- Specified by:
destroyDirectBuffer
in interfaceBufferAllocator
- Parameters:
toBeDestroyed
- ignored
-
allocate
Allocate a direct ByteBuffer of the specified size.- Specified by:
allocate
in interfaceBufferAllocator
- Parameters:
size
- in bytes (≥0)- Returns:
- a new direct buffer
-