Search Results for

    Show / Hide Table of Contents

    Class CollectionPoolCache

    Cache container that holds a list of cached collections to allow reuse and reduced memory allocation amount. Helps with sharing data across code and usages. It's thread-safe.

    Inheritance
    CollectionPoolCache
    Assembly: FlaxEngine.dll
    File: Engine/Core/Collections/CollectionPoolCache.h
    Syntax
    public class CollectionPoolCache<T, ClearCallback, CreateCallback>
    Type Parameters
    T

    ClearCallback

    CreateCallback

    Constructors

    ~CollectionPoolCache()

    Finalizes an instance of the CollectionPoolCache class.

    Declaration
    public ~CollectionPoolCache()

    Methods

    Get()

    Gets the collection instance from the pool. Can reuse the object from the pool or create a new one. Returns collection is always cleared and ready to use.

    Declaration
    public ScopeCache Get()
    Returns
    ScopeCache

    The collection (cleared).

    GetUnscoped()

    Gets the collection instance from the pool. Can reuse the object from the pool or create a new one. Returns collection is always cleared and ready to use.

    Declaration
    public T* GetUnscoped()
    Returns
    T

    The collection (cleared).

    Put(T* value)

    Puts the collection value back to the pool.

    Declaration
    public void Put(T* value)
    Parameters
    T value

    Release()

    Releases all the allocated resources (existing in the pool that are not during usage).

    Declaration
    public void Release()
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat