-
Notifications
You must be signed in to change notification settings - Fork 2k
RefreshView can have a memory leak with a custom ICommand #16124
Copy link
Copy link
Labels
area-controls-refreshviewRefreshViewRefreshViewdelighterdelighter-scpartner/cat 😻this is an issue that impacts one of our partners or a customer our advisory team is engaged withthis is an issue that impacts one of our partners or a customer our advisory team is engaged withperf/memory-leak 💦Memory usage grows / objects live forever (sub: perf)Memory usage grows / objects live forever (sub: perf)platform/androidplatform/iosplatform/macosmacOS / Mac CatalystmacOS / Mac Catalystplatform/windowss/triagedIssue has been reviewedIssue has been reviewedt/bugSomething isn't workingSomething isn't working
Milestone
Metadata
Metadata
Assignees
Labels
area-controls-refreshviewRefreshViewRefreshViewdelighterdelighter-scpartner/cat 😻this is an issue that impacts one of our partners or a customer our advisory team is engaged withthis is an issue that impacts one of our partners or a customer our advisory team is engaged withperf/memory-leak 💦Memory usage grows / objects live forever (sub: perf)Memory usage grows / objects live forever (sub: perf)platform/androidplatform/iosplatform/macosmacOS / Mac CatalystmacOS / Mac Catalystplatform/windowss/triagedIssue has been reviewedIssue has been reviewedt/bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.
Description
This problem can be illustrated with a test such as:
main...jonathanpeppers:RefreshViewLeak
If you create a custom
ICommandon something like a singletonViewModel, and use it on aRefreshView, theRefreshViewwill live forever.I think this is lower priority, as the customer samples I've seen use
CommandorCommand<T>:maui/src/Controls/src/Core/Command.cs
Lines 113 to 117 in 49d22ac
And
WeakEventManagersidesteps this problem.If we fix this, it might be worth auditing all properties of type
ICommand.Steps to Reproduce
ICommandRefreshViewRefreshViewlives foreverLink to public reproduction project repository
main...jonathanpeppers:RefreshViewLeak
Version with bug
8.0.0-preview.5.8529
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android, Windows, macOS, Other (Tizen, Linux, etc. not supported by Microsoft directly)
Affected platform versions
All
Did you find any workaround?
Use
Command.Relevant log output
No response