Table of Contents

Class ArrayPoolMemory

Namespace
FellowOakDicom.Memory
Assembly
fo-dicom.core.dll

Represents memory collected from an array pool Once disposed, the array is returned to the pool

public class ArrayPoolMemory : IMemory, IDisposable
Inheritance
ArrayPoolMemory
Implements
Inherited Members
Extension Methods

Constructors

ArrayPoolMemory(MemoryOwner<byte>)

public ArrayPoolMemory(MemoryOwner<byte> memoryOwner)

Parameters

memoryOwner MemoryOwner<byte>

Properties

Bytes

The underlying byte array. Note that this will probably be longer than the requested length. Always use Length instead of the length property of the Bytes. Prefer to use Span or Memory if possible

public byte[] Bytes { get; }

Property Value

byte[]

Length

The originally requested length of the memory

public int Length { get; }

Property Value

int

Memory

An instance of memory wrapping the memory (for use in asynchronous methods)

public Memory<byte> Memory { get; }

Property Value

Memory<byte>

Span

An instance of span wrapping the memory (for use in synchronous methods)

public Span<byte> Span { get; }

Property Value

Span<byte>

Methods

Dispose()

public void Dispose()

~ArrayPoolMemory()

protected ~ArrayPoolMemory()