Search Results for

    Show / Hide Table of Contents

    Class SimplePool<T>

    Simple pool implementation.

    Inheritance
    object
    DisposableObject
    SimplePool<T>
    Implements
    IDisposable
    Inherited Members
    DisposableObject.Disposed
    DisposableObject.Dispose()
    DisposableObject.Dispose(bool)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Evergine.Framework.Helpers.Collections
    Assembly: Evergine.Framework.dll
    Syntax
    public class SimplePool<T> : DisposableObject, IDisposable
    Type Parameters
    Name Description
    T

    The pool object type.

    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()

    Destroy 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 remove.

    RetrieveItem()

    Gets an item from the pool. Instantiate a new item is there are no items available.

    Declaration
    public T RetrieveItem()
    Returns
    Type Description
    T

    The item from the pool.

    Implements

    IDisposable

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In This Article
    Back to top
    Generated by DocFX