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

Detach from KeyDown event to match code in Show() #1004

Merged

Conversation

developersthinksmartbox

As written, Backstage will attach to the KeyDown event of the owning window but later detach from the PreviewKeyDown event. This creates a memory leak where the Backstage instance (and everything else referenced from it) will be kept in memory for as long as the owning window, via the KeyDown event. In our application the appearance of the main window changes according to which mode the application is in, with the ribbon control part of the visual tree in only one of these modes. In this (perhaps slightly unusual) setup, simply opening the backstage will cause the application to leak memory. This PR aims to solve this problem by detaching from the KeyDown event in RestoreParentProperties as was, presumably, the original intent.

@batzen batzen added this to the 9.0.3 milestone Jan 24, 2022
@batzen
Copy link
Member

batzen commented Jan 24, 2022

Will try to release a new version tomorrow.
Thanks for contributing!

@batzen batzen merged commit 4c56765 into fluentribbon:develop Jan 24, 2022
batzen added a commit that referenced this pull request Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants