Class ArrayPool
Represents a set of wrapper methods over ArrayPool<T> class methods to simplify access to them.
Представляет набор методов обёрток над методами класса ArrayPool<T> для упрощения доступа к ним.
Namespace: Platform.Collections.Arrays
Assembly: Platform.Collections.dll
Syntax
public static class ArrayPool : object
Fields
| Improve this Doc View SourceDefaultMaxArraysPerSize
The default max arrays per size.
Declaration
public static readonly int DefaultMaxArraysPerSize
Field Value
Type | Description |
---|---|
Int32 |
DefaultSizesAmount
The default sizes amount.
Declaration
public static readonly int DefaultSizesAmount
Field Value
Type | Description |
---|---|
Int32 |
Methods
| Improve this Doc View SourceAllocate<T>(Int64)
Allocation of an array of a specified size from the array pool.
Выделение массива указанного размера из пула массивов.
Declaration
public static T[] Allocate<T>(long size)
Parameters
Type | Name | Description |
---|---|---|
Int64 | size | The allocated array size. Размер выделяемого массива. |
Returns
Type | Description |
---|---|
T[] | The array from a pool of arrays. Массив из пулла массивов. |
Type Parameters
Name | Description |
---|---|
T | The array elements type. Тип элементов массива. |
Free<T>(T[])
Freeing an array into an array pool.
Освобождение массива в пул массивов.
Declaration
public static void Free<T>(T[] array)
Parameters
Type | Name | Description |
---|---|---|
T[] | array | The array to be freed into the pull. Массив который нужно освобоить в пулл. |
Type Parameters
Name | Description |
---|---|
T | The array elements type. Тип элементов массива. |