Describe the bug
In my application, I encountered a memory leak and, after long debugging, found that if the progress bar has the Intermediate="True" flag, the resources are not released when the window is closed.
I've created the project where this can be reproduced.
https://github.com/ihtfw/AvaloniaProgressBarMemoryLeakDemo
To Reproduce
- Clone project repo https://github.com/ihtfw/AvaloniaProgressBarMemoryLeakDemo
- Run project ProgressBarMemoryLeakDemo.Desktop
- Attach memory profiler. I've used dotMemory
- Create memory snapshot
- Click Run Test button in application
- Wait until it finished
- Create one more memory snapshot
- Compare snapshots
- Now we see that 5 ProgressWindow objects are kept, but they should not!

If I change IsIndeterminate to False in ProgressWindow.axaml then everything works as expected.
Expected behavior
Release ProgressWindow object on close
Avalonia version
11.1.2
OS
Windows
Additional context

If we check Key retention paths, then it looks like that IsIndeterminate animation is causing problems. In my application I've make temporary fix this problem by changing IsIndeterminate to false in window close event. It solves the problem, but it's definitely incorrect behaviour.
Describe the bug
In my application, I encountered a memory leak and, after long debugging, found that if the progress bar has the Intermediate="True" flag, the resources are not released when the window is closed.
I've created the project where this can be reproduced.
https://github.com/ihtfw/AvaloniaProgressBarMemoryLeakDemo
To Reproduce
If I change IsIndeterminate to False in ProgressWindow.axaml then everything works as expected.
Expected behavior
Release ProgressWindow object on close
Avalonia version
11.1.2
OS
Windows
Additional context
If we check Key retention paths, then it looks like that IsIndeterminate animation is causing problems. In my application I've make temporary fix this problem by changing IsIndeterminate to false in window close event. It solves the problem, but it's definitely incorrect behaviour.