How do I avoid memory leaks caused by navigation and page lifecycle?

Platform: .NET MAUI|Category: Performance

Unsubscribe events, avoid capturing UI in long-lived closures, use WeakEventManager/WeakReference or IDisposable patterns for resource-holding ViewModels.

Unsubscribe example:

protected override void OnDisappearing() 

{ 

    base.OnDisappearing(); 

    publisher.SomeEvent -= OnSomeEvent; 

}