Interface MemoryManager.MemoryHandle<T>

Type Parameters:
T - The content type.
All Known Implementing Classes:
MemoryManager.ManualFreeMemoryHandle
Enclosing class:
MemoryManager

public static interface MemoryManager.MemoryHandle<T>
A memory area managed by the MemoryManager.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Manually release this memory area.
    get()
    Gets the content of this memory area.
    long
    Get the size that was requested for this memory area.
  • Method Details

    • get

      T get()
      Gets the content of this memory area.

      This method should be the preferred access to the memory since it will do error checking when free() was called.

      Returns:
      The memory area content.
    • getSize

      long getSize()
      Get the size that was requested for this memory area.
      Returns:
      the size
    • free

      void free()
      Manually release this memory area. There should be no memory consumed by this afterwards.