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

Fixed memory leak in MethodCommandNode.cs #15123

Closed

Conversation

adirh3
Copy link
Contributor

@adirh3 adirh3 commented Mar 25, 2024

What does the pull request do?

Fix a memory leak in MethodCommandNode.cs that keeps controls in memory even when a window is closed.

What is the current behavior?

Binding to methods keeps the source and the control in memory indefinitely.

What is the updated/expected behavior with this PR?

No memory leaks

How was the solution implemented (if it's not obvious)?

I am not sure what's the lifecycle of ExpressionNode, as it doesn't have any Dispose methods.
I changed subscription to PropertyChanged to be based on weak reference.

Checklist

Breaking changes

Obsoletions / Deprecations

Fixed issues

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0046594-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6
Copy link
Member

Suppressed by #15485

@maxkatz6 maxkatz6 closed this Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants