public sealed class MemoryViewDoc 13's four memory arenas, each with its rows.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
⚠ Refreshed on a button rather than every frame, and that is not laziness. GC.GetGCMemoryInfo and a walk of the leak tracker's dictionary are both real work, and a panel that did them sixty times a second would be a memory panel that allocates. It also makes the numbers readable: a heap size that changes every frame is one nobody can compare with the one they wrote down a minute ago.
⚠ Refreshing must not collect. GC.GetTotalMemory(true) would give a tidier number by running a blocking gen-2 collection first — which changes what is being measured and stalls the editor. MemorySnapshot passes false and says so.
Fields and properties (8)
protected override string TagNameThe element name this type answers to when a caller does not choose one.
protected override bool AcceptsFocusWhether the focus can rest on this kind of control at all.
public UiElement ToolbarThe strip along the top.
public Button RefreshWhat takes a fresh reading.
public UiElement StatusWhen the reading on screen was taken.
public ScrollView BodyWhere the rows go.
public MemoryProviders ProvidersWhere the arenas this assembly cannot see into come from.
public MemorySnapshot? SnapshotThe reading on screen.
Methods (4)
public void Take()Takes a fresh reading and shows it.
public void Show(MemorySnapshot snapshot)Shows a reading somebody else took.
protected override void OnCreated()Builds whatever this element is made of, once, as it joins a document.
public static string Bytes(long bytes)Formats a byte count the way a person reads one.
Used by (5)
- DiagnosticsModuleVixen.Editor.Diagnostics
- DiagnosticsPanelTestsVixen.Editor.App.Tests
- EditorApplicationVixen.Editor.App
- StatisticsAndMemoryTestsVixen.Editor.Profiler.Tests
- StatisticsViewVixen.Editor.Profiler