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
Bindings provided by Markup-Extensions which are constructed from Observables using ToBinding are never unsubscribed from, resulting in a memory leak.
To Reproduce
Sample code:
Extension:
internalclassTestMarkupExtension:MarkupExtension{publicoverrideobjectProvideValue(IServiceProviderserviceProvider){returnObservable.Never<string>().ToBinding();// will never be unsubscribed}}
Usage:
<TextBlockText="{local:TestMarkup}" />
I created a Demo-Project to demonstrate the issue. Click the "Toggle"-Button multiple times and watch the debug-output. The subscription to the observable in the ViewModel gets disposed properly, but the subsciption to the observable from the MarkupExtension doesn't.
Expected behavior
The subscription should be disposed when the view get's removed.
Avalonia version
11.2.3, 11.0.10
OS
Windows
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
Bindings provided by Markup-Extensions which are constructed from Observables using ToBinding are never unsubscribed from, resulting in a memory leak.
To Reproduce
Sample code:
Extension:
Usage:
I created a Demo-Project to demonstrate the issue. Click the "Toggle"-Button multiple times and watch the debug-output. The subscription to the observable in the ViewModel gets disposed properly, but the subsciption to the observable from the MarkupExtension doesn't.
Expected behavior
The subscription should be disposed when the view get's removed.
Avalonia version
11.2.3, 11.0.10
OS
Windows
Additional context
No response
The text was updated successfully, but these errors were encountered: