Open sandre58 opened 5 months ago
Please provide a minimal repro project, it would ease up the troubleshooting.
@sandre58 Sorry, I can not repro your issues. As @h3xds1nz says, could you provide more info?
Hello,
Thank you for your response.
Attached, a project to reproduce the problem. WpfApp1.zip
Simply open and close the window using the button. We see in the task manager that the memory increases each time and does not go down when we close the window. The windows are unfortunately not disposable.
@sandre58 Sorry, I download and run your project. But I can not repro your issues. And I am afraid this is because you do not understand the memory related knowledge caused by misunderstanding
Please let me know if my steps are wrong.
@sandre58 can you confirm if the steps followed above are correct and it is not dependent on specific application configurations.
Description
WPF windows seem to cause memory leaks. Each time a window is opened, the RAM increases but does not decrease when the window is closed. If a window contains lots of controls, the memory can quickly increase to several GigaBytes. It seems that after closing the window, the application remembers Bindings and weakreferences to controls.
Reproduction Steps
Create an WPF application with a button which open a dialog (modal or not modal) window. This window contains 1000 textboxes (created dynamically in constructor). Open and close this windows several times.
Expected behavior
RAM decrease when we close window (same RAM before closing) Garbage collector is called when we close window.
Actual behavior
RAM increases every time I open the window and it hardly goes down when I close the window
Regression?
No response
Known Workarounds
No response
Impact
No response
Configuration
No response
Other information
No response