Class RefHandle<T>
A class that handles the allocation and disposal of an object. All the different encoders use it.
Namespace: Unity.Media
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 |
|---|---|
| Boolean |
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(Boolean)
Cleans up the handle's resources.
Declaration
public void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| Boolean | 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. |
Finalize()
The finalizer of the class.
Declaration
protected void Finalize()