-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[core] WeakEventManager.RemoveEventHandler() should clear subscriptions
Context: #12039 Context: https://github.com/Vroomer/MAUI-master-detail-memory-leak Context: https://github.com/symbiogenesis/Maui.DataGrid/tree/memory-leak Reviewing memory snapshots in the above apps, sometimes I would see new `WeakEventManager+Subscription` objects be created and never go away. I noticed the `WeakEventManager.RemoveEventHandler()` method did not remove any `Subscription` entries that it encountered were no longer alive. I could reproduce this problem in a test, and improved an existing test to check this collection is cleared appropriately: readonly Dictionary<string, List<Subscription>> _eventHandlers = new();
- Loading branch information
1 parent
0964dc9
commit 1494f80
Showing
2 changed files
with
55 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters