docs.unity3d.com
    Show / Hide Table of Contents

    Class GenericPool<T>

    Generic pool.

    Inheritance
    Object
    GenericPool<T>
    Namespace: UnityEngine.Rendering
    Syntax
    public static class GenericPool<T>
        where T : new()
    Type Parameters
    Name Description
    T

    Type of the objects in the pull.

    Methods

    Get()

    Get a new object.

    Declaration
    public static T Get()
    Returns
    Type Description
    T

    A new object from the pool.

    Get(out T)

    Get a new PooledObject

    Declaration
    public static ObjectPool<T>.PooledObject Get(out T value)
    Parameters
    Type Name Description
    T value

    Output typed object.

    Returns
    Type Description
    ObjectPool.PooledObject<>

    A new PooledObject.

    Release(T)

    Release an object to the pool.

    Declaration
    public static void Release(T toRelease)
    Parameters
    Type Name Description
    T toRelease

    Object to release.

    In This Article
    • Methods
      • Get()
      • Get(out T)
      • Release(T)
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023