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
The subclass that supports recycling.
-
Constructor Summary
-
Method Summary
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
-
Constructor Details
-
RecycledResource
-
-
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.
-