Package com.jme3.util

Interface BufferAllocator

All Known Implementing Classes:
PrimitiveAllocator

public interface BufferAllocator
Interface to create/destroy direct buffers.
  • Method Summary

    Modifier and Type
    Method
    Description
    allocate(int size)
    Allocate a direct ByteBuffer of the specified size.
    void
    destroyDirectBuffer(Buffer toBeDestroyed)
    De-allocate a direct buffer.
  • Method Details

    • destroyDirectBuffer

      void destroyDirectBuffer(Buffer toBeDestroyed)
      De-allocate a direct buffer.
      Parameters:
      toBeDestroyed - the buffer to de-allocate (not null)
    • allocate

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