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
labelstringLabel for this scope.
profilerSessionProfilerSessionOptional profiler session to record allocations to.
Properties
Before
Gets the before snapshot.
public MemorySnapshot Before { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()