Show / Hide Table of Contents

    Interface IArrayPool<T>

    Provides an interface for using pooled arrays.

    Namespace: Bayat.Json
    Assembly: Bayat.Json.Runtime.dll
    Syntax
    public interface IArrayPool<T>
    Type Parameters
    Name Description
    T

    The array type content.

    Methods

    | Improve this Doc View Source

    Rent(Int32)

    Rent a array from the pool. This array must be returned when it is no longer needed.

    Declaration
    T[] Rent(int minimumLength)
    Parameters
    Type Name Description
    System.Int32 minimumLength

    The minimum required length of the array. The returned array may be longer.

    Returns
    Type Description
    T[]

    The rented array from the pool. This array must be returned when it is no longer needed.

    | Improve this Doc View Source

    Return(T[])

    Return an array to the pool.

    Declaration
    void Return(T[] array)
    Parameters
    Type Name Description
    T[] array

    The array that is being returned.

    • Improve this Doc
    • View Source
    • 0 Comments