Package icyllis.arc3d.engine

# Class RecycledResource

java.lang.Object
icyllis.arc3d.core.RefCnt
icyllis.arc3d.engine.ManagedResource
icyllis.arc3d.engine.RecycledResource

All Implemented Interfaces:
  `RefCounted`

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RecycledResource(Device device)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract void`
  `onRecycle()`
  Override this method to invoke recycling of the underlying resource.
  `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.

  ### Methods inherited from class icyllis.arc3d.engine.ManagedResource

  `getDevice`

  ### Methods inherited from class icyllis.arc3d.core.RefCnt

  `create, create, deallocate, getRefCnt, getRefCntAcquire, getRefCntVolatile, move, move, ref, unique, unref`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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.