Class RefHandle<T>
A class that handles the allocation and disposal of an object. All the different encoders use it.
Implements
Inherited Members
Namespace: Unity.Media
Assembly: Unity.Recorder.Base.dll
Syntax
public class RefHandle<T> : IDisposable where T : class
Type Parameters
Name | Description |
---|---|
T | The type of object that the handle refers to. |
Constructors
RefHandle()
The constructor of the handle.
Declaration
public RefHandle()
RefHandle(T)
The constructor of the handle.
Declaration
public RefHandle(T target)
Parameters
Type | Name | Description |
---|---|---|
T | target | The object to use as the target of the handle. |
Properties
IsCreated
Specifies whether the handle has been allocated or not.
Declaration
public bool IsCreated { get; }
Property Value
Type | Description |
---|---|
bool |
Target
The target object of the handle.
Declaration
public T Target { get; set; }
Property Value
Type | Description |
---|---|
T |
Methods
Dispose()
Cleans up the handle's resources.
Declaration
public void Dispose()
Dispose(bool)
Cleans up the handle's resources.
Declaration
public void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | If this is True, the method has been called by a user's code. Otherwise, it has been called by the runtime and only unmanaged resources can be disposed. |
~RefHandle()
The finalizer of the class.
Declaration
protected ~RefHandle()