Versus AdamE.MemoryToolkit.Maui
Inspired by AdamE.MemoryToolkit.Maui (MIT). This package is a separate API — UseLeakAnalyser, LeakMonitor, TearDown, LeakGraph — not a drop-in fork.
| Requirement | LeakAnalyser | AdamE.MemoryToolkit.Maui | Profiler |
|---|---|---|---|
| WeakRef + forced GC on unload | Yes | Yes | No |
| Handler disconnect / compartmentalize | Yes | Yes | No |
| Android + Windows TFMs | Yes | Shared net10.0 only | — |
| GC knobs on options | Yes | Custom monitor | — |
| Host ILogger after Build() | Yes | Temp service provider | — |
| Retain-path diagnosis | No | No | Yes |
MIT. Use it if you already adopted that API and do not need Android / Windows TFMs or host ILogger after Build(). AdamE.MemoryToolkit.Maui
Versus Diagnostics, Performance, and LeakProbe
| Need | Package |
|---|---|
| Page / view still alive after pop | Plugin.Maui.LeakAnalyser |
| Crash, ANR, pre-crash breadcrumbs | Plugin.Maui.Diagnostics |
| Startup / page / API timings and memory scoreboard | Plugin.Maui.Performance |
| Umbrella export of sibling events | Plugin.Maui.Observability |
| Unit-test WeakReference for ViewModels | Plugin.Maui.MVVMExpress.Testing LeakProbe |
LeakProbe is a test helper: Track returns a WeakReference and IsCollected asserts a ViewModel was collected. LeakAnalyser is a runtime visual-tree probe in the app. Use both — LeakProbe in CI for subscription leaks, LeakAnalyser on device after navigation.
When to choose LeakAnalyser
- You need Android and Windows TFMs, not only a shared net10.0 assembly.
- You want GC knobs (MaxCollections, MillisecondsBetweenCollections) on UseLeakAnalyser options.
- You want the host ILogger after Build(), not a temporary service provider.
- You already ship Diagnostics or Observability and only need an OnLeaked callback — no extra package reference from this plugin.
Choose a profiler when you already know something is leaked and need the retain path. Choose Diagnostics when the failure is a crash or ANR. Choose Performance when the question is how long something took.