You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When a FrameworkElement descendant subscribes to its own event, WinUI internals creates a strong handle to the delegate and the event owner. As a result, the framework element cannot be collected.
Describe the bug
When a FrameworkElement descendant subscribes to its own event, WinUI internals creates a strong handle to the delegate and the event owner. As a result, the framework element cannot be collected.
Subscription sample:
WinDbg & SOS output:
I tried to subscribe to an event with the weak event handler as follows:
But still, there's a remaining strong handle:
In my real application, I cannot create any controls that track their properties by using event handlers.
Steps to reproduce the bug
Steps to reproduce the behavior:
Click Me
buttonExpected behavior
All of the FakeControl instances should be collectible.
Screenshots
Version Info
NuGet package version: [Microsoft.WinUI 3.0.0-preview3.201113.0]
Windows app type:
Additional context
App5.zip
The text was updated successfully, but these errors were encountered: