Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

MemoryPool<T>.Rent(Int32) Method

Definition

Namespace:
System.Buffers
Assemblies:
netstandard.dll, System.Memory.dll
Assembly:
System.Memory.dll
Assembly:
netstandard.dll
Source:
MemoryPool.cs
Source:
MemoryPool.cs
Source:
MemoryPool.cs
Source:
MemoryPool.cs
Source:
MemoryPool.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Returns a memory block capable of holding at least minBufferSize elements of T.

public abstract System.Buffers.IMemoryOwner<T> Rent(int minBufferSize = -1);
abstract member Rent : int -> System.Buffers.IMemoryOwner<'T>
Public MustOverride Function Rent (Optional minBufferSize As Integer = -1) As IMemoryOwner(Of T)

Parameters

minBufferSize
Int32

The minimum number of elements of T that the memory pool can hold. A value of -1 returns a memory pool set to the default size for the pool.

Returns

A memory block capable of holding at least minBufferSize elements of T.

Applies to


Feedback

Was this page helpful?