Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event handler leak on drawerHost #3708

Open
salty-kambi opened this issue Oct 29, 2024 · 0 comments
Open

Event handler leak on drawerHost #3708

salty-kambi opened this issue Oct 29, 2024 · 0 comments
Labels
bug evaluation required Items is pending review or evaluation by the team

Comments

@salty-kambi
Copy link

Bug explanation

Hi, i'm using MaterialDesign's DrawerHost but when i repeatedly open/close the drawer, it generate System.Windows.VisualStateManager+<>c__DisplayClass12_0 and MS.Internal.FreezableDefaultValueFactory+FreezableDefaultPromoter event handler leak according to dotMemory.

dotmemory_eventleak

here is the simplified implementation, the elements use the base style of materialDesign and the binding is a property using PropertyChanged:

<materialDesign:DrawerHost IsLeftDrawerOpen="{Binding IsDrawerOpen}" OpenMode="Standard"
	LeftDrawerCloseOnClickAway="True">
	<materialDesign:DrawerHost.LeftDrawerContent>
		<TextBlock Text="oui"/>
	</materialDesign:DrawerHost.LeftDrawerContent>
	<ToggleButton IsChecked="{Binding IsDrawerOpen}"/>
</materialDesign:DrawerHost>

Thanks

Version

5.1.0

@salty-kambi salty-kambi added bug evaluation required Items is pending review or evaluation by the team labels Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug evaluation required Items is pending review or evaluation by the team
Projects
None yet
Development

No branches or pull requests

1 participant