MemoryPool<T> 类

定义

表示内存块的池。Represents a pool of memory blocks.

generic <typename T>
public ref class MemoryPool abstract : IDisposable
public abstract class MemoryPool<T> : IDisposable
type MemoryPool<'T> = class
    interface IDisposable
Public MustInherit Class MemoryPool(Of T)
Implements IDisposable

类型参数

T

内存池中项的类型。The type of the items in the memory pool.

继承
MemoryPool<T>
实现

构造函数

MemoryPool<T>()

构造内存池的新实例。Constructs a new instance of a memory pool.

属性

MaxBufferSize

获取此池所支持的最大缓冲区大小。Gets the maximum buffer size supported by this pool.

Shared

获取基于数组的内存池的单一实例。Gets a singleton instance of a memory pool based on arrays.

方法

Dispose()

释放内存池使用的所有资源。Frees all resources used by the memory pool.

Dispose(Boolean)

释放内存池占用的非托管资源,并有选择地释放托管资源。Frees the unmanaged resources used by the memory pool and optionally releases the managed resources.

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
Rent(Int32)

返回至少可容纳 minBufferSize T 元素的内存块。Returns a memory block capable of holding at least minBufferSize elements of T.

ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于