• CacheManager
  • Documentation
  • Api Docs
  • MichaCo.net
    Show / Hide Table of Contents

    Interface IObjectPoolPolicy<T>

    Contract used by ObjectPool<T> to define how to create and return instances to a pool.

    Namespace:CacheManager.Core.Utility
    Assembly:CacheManager.Core.dll
    Syntax
    public interface IObjectPoolPolicy<T>
    Type Parameters
    Name Description
    T

    The type of objects of the pool.

    Methods

    | Improve this Doc View Source

    CreateNew()

    Creates a new instance of T.

    Declaration
    T CreateNew()
    Returns
    Type Description
    T

    The new instance.

    | Improve this Doc View Source

    Return(T)

    Checks if the instance can be returned and may reset the instance to a state which can be reused.

    Declaration
    bool Return(T value)
    Parameters
    Type Name Description
    T value

    The instance which should be returned.

    Returns
    Type Description
    Boolean

    True if the instance can be returned, False otherwise.

    • Improve this Doc
    • View Source
    © 2025 by Michael Conrad. All rights reserved. - MichaCo.net