DotNext by Roman Sakno

<PackageReference Include="DotNext" Version="0.14.0" />

 ArrayRental<T>

public struct ArrayRental<T> : IDisposable
Represents array obtained from array pool.
public Memory<T> Memory { get; }

Gets memory associated with the rented array.

public ArrayRental(ArrayPool<T> pool, int minimumLength, bool clearArray = false)

Obtains a new array from array pool.

public ArrayRental(int minimumLength, bool clearArray = false)

Obtains a new array from Shared.

public static T[] op_Implicit(ref ArrayRental rental)

Obtains rented array.

public void Dispose()

Returns array to the pool.