Search Results for

    Show / Hide Table of Contents

    Class SimplePool<T>

    Simple pool implementation.

    Inheritance
    object
    DisposableObject
    SimplePool<T>
    Inherited Members
    DisposableObject.Disposed
    DisposableObject.Dispose()
    DisposableObject.Dispose(bool)
    Namespace: Evergine.Framework.Helpers.Collections
    Assembly: Evergine.Framework.dll
    Syntax
    public class SimplePool<T> : DisposableObject
    Type Parameters
    Name Description
    T

    The type of object in the pool.

    Constructors

    SimplePool(Func<T>)

    Initializes a new instance of the SimplePool<T> class.

    Declaration
    public SimplePool(Func<T> allocator)
    Parameters
    Type Name Description
    Func<T> allocator

    The allocator function.

    Methods

    Destroy()

    Destroys all resources of this instance.

    Declaration
    protected override void Destroy()
    Overrides
    DisposableObject.Destroy()

    ReleaseItem(T)

    Releases an item from the pool.

    Declaration
    public void ReleaseItem(T item)
    Parameters
    Type Name Description
    T item

    The item to be released.

    RetrieveItem()

    Gets an item from the pool. Instantiates a new item if there are no items available.

    Declaration
    public T RetrieveItem()
    Returns
    Type Description
    T

    The item from the pool.

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX