-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Binding a property in datatemplate via a named control caused memory leak #15444
Comments
test also 11.1 beta pls |
Same as #15443 |
i tried 11.1.0-beta1, also exists. |
oh, i'll close this issue |
I am not sure it is the same leak, I think it is a different thing. I think it is better to keep it open, memory leaks are a big problem, better keep track of all repros. |
This leak is caused by
so it is a different problem than #15443 Looks like it was introduced with binding refactor |
reopen now~ |
@BAndysc note, you attached file from 11.1 version, while this issue is reproduced on 11.0. 11.0.10 code doesn't seem to use strong references there: https://github.com/AvaloniaUI/Avalonia/blob/11.0.10/src/Avalonia.Base/Data/Core/ExpressionNode.cs |
That's true, I didn't take a look at 11.0 branch, and also, my conclusion that the leak is caused by The right path shows a leak where named binding is involved, with my zero knowledge about styling and binding system, I can't tell where the leak "begins". As a non paying user I am not in position to complain, but imho those leaks are quite a big problem, affecting vast majority of the user base (even if they are unaware). |
We're nit saying these leaks couldn't get a problem. So better to fix them st some point in time. If you want to help us speeding it up, you can also add your sample into src/Samples/Sandbox and try to debug it. From there you can step through the whole binding path. Again, I don't force anyone to do that, just an idea. |
Describe the bug
When binding a property from viewmodel in datatemplate through a named control, memory leak occured. see below code:
if replace '#elems' with '$parent[ListBox]', everything will be fine.
To Reproduce
repeat step 3 multiple times, and you will see Process Memory stays high and never fall back
memory-leak.mov
Expected behavior
no memory leak occurs.
Avalonia version
11.0.10
OS
Windows
Additional context
No response
The text was updated successfully, but these errors were encountered: