docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class RefHandle<T>

    A class that handles the allocation and disposal of an object. All the different encoders use it.

    Inheritance
    object
    RefHandle<T>
    Implements
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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()

    Implements

    IDisposable
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)