DotNext by .NET Foundation and Contributors

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

 MemoryRental<T>

public struct MemoryRental<T>
public static int StackallocThreshold { get; }

public bool IsEmpty { get; }

public ref T this[int index] { get; }

public int Length { get; }

public Span<T> Span { get; }

public MemoryRental(Span<T> span)

public MemoryRental(Span<T> span, int length)

public MemoryRental(MemoryPool<T> pool, int minBufferSize, bool exactSize = true)

public MemoryRental(MemoryPool<T> pool)

public MemoryRental(int minBufferSize, bool exactSize = true)

public static MemoryRental<T> op_Implicit(Span<T> span)

public void Dispose()

public ref T GetPinnableReference()