Class RecycleStack<T>

java.lang.Object
boofcv.struct.lists.RecycleStack<T>

public class RecycleStack<T> extends Object
Thread safe stack for creating and recycling memory
  • Constructor Details

  • Method Details

    • purge

      public void purge()
      Frees all memory referenced internally and starts from fresh
    • pop

      public T pop()
      Returns an instance. If there are instances queued up internally one of those is returned. Otherwise a new instance is created.
      Returns:
      object instance
    • recycle

      public void recycle(T object)
      Recycles the object for later use
      Parameters:
      object - The object that's to be recycled