Package com.jme3.util

Class PrimitiveAllocator

java.lang.Object
com.jme3.util.PrimitiveAllocator
All Implemented Interfaces:
BufferAllocator

public final class PrimitiveAllocator extends Object implements BufferAllocator
This class contains a primitive allocator with no special logic, should work on any jvm
  • Constructor Details

    • PrimitiveAllocator

      public PrimitiveAllocator()
  • Method Details

    • destroyDirectBuffer

      public void destroyDirectBuffer(Buffer toBeDestroyed)
      De-allocate a direct buffer.
      Specified by:
      destroyDirectBuffer in interface BufferAllocator
      Parameters:
      toBeDestroyed - ignored
    • allocate

      public ByteBuffer allocate(int size)
      Allocate a direct ByteBuffer of the specified size.
      Specified by:
      allocate in interface BufferAllocator
      Parameters:
      size - in bytes (≥0)
      Returns:
      a new direct buffer