-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Memory leak in RadioButton ControlTemplate #23199
Copy link
Copy link
Closed as not planned
Labels
area-controls-radiobuttonRadioButton, RadioButtonGroupRadioButton, RadioButtonGroupp/2Work that is important, but is currently not scheduled for releaseWork that is important, but is currently not scheduled for releaseperf/memory-leak 💦Memory usage grows / objects live forever (sub: perf)Memory usage grows / objects live forever (sub: perf)platform/windowss/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Milestone
Metadata
Metadata
Assignees
Labels
area-controls-radiobuttonRadioButton, RadioButtonGroupRadioButton, RadioButtonGroupp/2Work that is important, but is currently not scheduled for releaseWork that is important, but is currently not scheduled for releaseperf/memory-leak 💦Memory usage grows / objects live forever (sub: perf)Memory usage grows / objects live forever (sub: perf)platform/windowss/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.
Description
Hi,
we found that when refreshing a list which contains customized RadioButtons, hundreds of Ellipse objects from the template remain in memory.
I created a sample repo which just uses the control template from the maui documentation https://learn.microsoft.com/en-us/dotnet/maui/user-interface/controls/radiobutton?view=net-maui-8.0#redefine-radiobutton-appearance
When refreshing the list a few times, doing GC.Collects in between and taking a snapshot just using Visual Studio, I found the same issue occuring in the sample repo:

Same behavior happens with a Release build + JetBrains dotMemory in our production app.
Steps to Reproduce
Link to public reproduction project repository
https://github.com/krdmllr/MauiMemoryLeaks
Version with bug
8.0.60 SR6
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
windows 10.0.19041.0
Did you find any workaround?
No response
Relevant log output
No response