Table of Contents

Struct MemoryScope

Namespace
AiDotNet.Diagnostics
Assembly
AiDotNet.dll

A scope that automatically captures before/after memory snapshots.

public readonly struct MemoryScope : IDisposable
Implements
Inherited Members

Constructors

MemoryScope(string, ProfilerSession?)

Creates a memory tracking scope.

public MemoryScope(string label, ProfilerSession? profilerSession = null)

Parameters

label string

Label for this scope.

profilerSession ProfilerSession

Optional profiler session to record allocations to.

Properties

Before

Gets the before snapshot.

public MemorySnapshot Before { get; }

Property Value

MemorySnapshot

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()