Class HandlePool<T>

java.lang.Object
dev.engine.core.handle.HandlePool<T>

public class HandlePool<T> extends Object
  • Constructor Details

    • HandlePool

      public HandlePool()
    • HandlePool

      public HandlePool(String resourceType)
  • Method Details

    • allocate

      public Handle<T> allocate()
    • release

      public void release(Handle<T> handle)
    • allocatedCount

      public int allocatedCount()
      Returns the number of currently allocated (not yet released) handles.
    • reportLeaks

      public int reportLeaks()
      Logs a warning if any handles are still allocated. Call from device.close().
      Returns:
      the number of leaked handles
    • isValid

      public boolean isValid(Handle<T> handle)