Package icyllis.arc3d.engine

# Class ManagedResource

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

All Implemented Interfaces:
  `RefCounted`

Direct Known Subclasses:
  `ComputePipeline`, `Framebuffer`, `GLProgram`, `GLTextureView`, `GLUniformBuffer`, `GLVertexArray`, `GraphicsPipeline`, `RecycledResource`, `VulkanCommandPool`, `VulkanImageView`, `VulkanRenderPassFramebuffer`

public abstract class ManagedResource extends RefCnt
Base class for operating GPU resources that may be shared by multiple objects, in particular objects that are tracked by a command buffer. Unlike `Resource`, these resources will not have a large memory allocation, but a set of constant states instead. When an existing owner wants to share a reference, it calls `RefCnt.ref()`. When an owner wants to release its reference, it calls `RefCnt.unref()`. When the shared object's reference count goes to zero as the result of an `RefCnt.unref()` call, its `RefCnt.deallocate()` is called. It is an error for the destructor to be called explicitly (or via the object going out of scope on the stack or calling `RefCnt.deallocate()`) if `RefCnt.getRefCnt()` > 1.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ManagedResource(Device device)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected Device`
  `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

  - ### ManagedResource

    public ManagedResource(Device device)

- ## Method Details

  - ### getDevice

    protected Device getDevice()