MemoryPool<T>.Rent(Int32) 方法

定義

傳回可以保留至少 minBufferSize 個 T 元素的記憶體區塊。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)

參數

minBufferSize
Int32

記憶體集區可以保存的 T 元素數目下限。The minimum number of elements of T that the memory pool can hold. 值 -1 會傳回設為集區預設大小的記憶體集區。A value of -1 returns a memory pool set to the default size for the pool.

傳回

可以保留至少 minBufferSize 個 T 元素的記憶體區塊。A memory block capable of holding at least minBufferSize elements of T.

適用於