Open KenionX opened 2 years ago
Hello KenionX, thank you for opening an issue with us!
I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌
@RBrid I know you're busy, but I don't see where we'd be registering an event here in the Pointer Moved event or anything. If you had a couple of minutes to maybe point us in the right direction here, that'd be much appreciated. Thanks!
This issue is reproduceable on UWP: App1.zip
I'm still looking for what exactly causes this, but after investigating I've found that this line is causing extra allocations:
Commenting out the line, the memory increase goes away. Leaving the line there but removing all code in the handler, the memory increase comes back.
Attaching the event is causing this (not the event invocation or event handler), but for some reason it's only that one event. Still investigating.
Describe the bug
Moving the mouse over the table headers on a DataGrid will cause an event handler leak, resulting in a Memoryleak on the control
Regression
No response
Reproducible in sample app?
Steps to reproduce
https://github.com/KenionX/Winui3MemoryLeak/tree/master
Expected behavior
No memory leak
Screenshots
Windows Build Number
Other Windows Build number
No response
App minimum and target SDK version
Other SDK version
No response
Visual Studio Version
2022
Visual Studio Build Number
17.2.6
Device form factor
Desktop
Nuget packages
CommunityToolkit.WinUI.UI.Controls.DataGrid 7.1.2 Microsoft.WindowsAppSDK 1.1.4 Microsoft.Windows.SDK.BuildTools 10.0.22621.1 MvvmGen 1.1.5
Additional context
No response
Help us help you
No.