Table of Contents

Class MemoryManager<T>

Namespace
System.Buffers
Assembly
System.Memory.dll
public abstract class MemoryManager<T> : IMemoryOwner<T>, IDisposable, IPinnable

Type Parameters

T
Inheritance
MemoryManager<T>
Implements
Inherited Members
Extension Methods

Constructors

MemoryManager()

protected MemoryManager()

Properties

Memory

public virtual Memory<T> Memory { get; }

Property Value

Memory<T>

Methods

CreateMemory(int)

protected Memory<T> CreateMemory(int length)

Parameters

length int

Returns

Memory<T>

CreateMemory(int, int)

protected Memory<T> CreateMemory(int start, int length)

Parameters

start int
length int

Returns

Memory<T>

Dispose(bool)

protected abstract void Dispose(bool disposing)

Parameters

disposing bool

GetSpan()

public abstract Span<T> GetSpan()

Returns

Span<T>

Pin(int)

public abstract MemoryHandle Pin(int elementIndex = 0)

Parameters

elementIndex int

Returns

MemoryHandle

TryGetArray(out ArraySegment<T>)

protected virtual bool TryGetArray(out ArraySegment<T> segment)

Parameters

segment ArraySegment<T>

Returns

bool

Unpin()

public abstract void Unpin()