<PackageReference Include="System.Memory" Version="4.5.3" />

MemoryPool<T>

public abstract class MemoryPool<T> : IDisposable
namespace System.Buffers { public abstract class MemoryPool<T> : IDisposable { private static readonly MemoryPool<T> s_shared = new System.Buffers.ArrayMemoryPool<T>(); public static MemoryPool<T> Shared => s_shared; public abstract int MaxBufferSize { get; } public abstract IMemoryOwner<T> Rent(int minBufferSize = -1); public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } protected abstract void Dispose(bool disposing); } }