Package com.jme3.util
Class ReflectionAllocator
java.lang.Object
com.jme3.util.ReflectionAllocator
- All Implemented Interfaces:
- BufferAllocator
This class contains the reflection based way to remove DirectByteBuffers in
 java, allocation is done via ByteBuffer.allocateDirect
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionallocate(int size) Allocate a direct ByteBuffer of the specified size.voiddestroyDirectBuffer(Buffer toBeDestroyed) This function explicitly calls the Cleaner method of a direct buffer.
- 
Constructor Details- 
ReflectionAllocatorpublic ReflectionAllocator()
 
- 
- 
Method Details- 
destroyDirectBufferThis function explicitly calls the Cleaner method of a direct buffer.- Specified by:
- destroyDirectBufferin interface- BufferAllocator
- Parameters:
- toBeDestroyed- The direct buffer that will be "cleaned". Utilizes reflection.
 
- 
allocateDescription copied from interface:BufferAllocatorAllocate a direct ByteBuffer of the specified size.- Specified by:
- allocatein interface- BufferAllocator
- Parameters:
- size- in bytes (≥0)
- Returns:
- a new direct buffer
 
 
-