Class RecycledResource

All Implemented Interfaces:
RefCounted

public abstract class RecycledResource extends ManagedResource
The subclass that supports recycling.
  • Constructor Details

    • RecycledResource

      public RecycledResource(Device device)
  • Method Details

    • recycle

      public final void recycle()
      When recycle is called and there is only one ref left on the resource, we will signal that the resource can be recycled for reuse. If the subclass (or whoever is managing this resource) decides not to recycle the objects, it is their responsibility to call unref on the object.
    • onRecycle

      public abstract void onRecycle()
      Override this method to invoke recycling of the underlying resource.