Open Ajith-GS opened 10 months ago
A workaround is to not use x:bind in your bindings and to manually unwire all event handlers even those done in XAML. This will allow the window to be properly garbage collected.
@NicholasChrzan Thank you for the reply, The given sample application doesn't have any XAML design or x:bind and is still not releasing memory.
This should got more attention. It's still leaking in Winui3 1.5. Dismissing the window does not release a single bit of memory. Can reproduce simply with the official WinUI 3 Gallery app in the multiple windows
page.
Can this be fix?
Even explorer.exe have this problem
Explorer is very bad, memory usage grows to around a gigabyte with time and a bunch of threads msctf.dll!ShellHandwriting::DelegationManager::DelegateThreadProc
are consuming memory too
Still happening to this day in dotnet8, even in empty windows.
I have the same problem in my project that has already been launched in production. Does anyone have a workaround?
You can reproduce this by switch between two tabs in WinUI3 Gallery app.But there is no such problem in winui2 Gallery . Maui may also be affected by this bug.
You can reproduce this by switch between two tabs in WinUI3 Gallery app.But there is no such problem in winui2 Gallery . Maui may also be affected by this bug.
UWP is also affected by x:Bind
and will have leaks.
Describe the bug
The memory is not released after dismissing WinUI 3 windows. Consider a WinUI3 app that creates multiple XAML windows on a button click. Each time a window is created, the memory usage increases. But memory usage is not decreasing when dismissing the windows.
Steps to reproduce the bug
Expected behavior
When each window is closed, the memory use should be reduced.
Screenshots
No response
NuGet package version
Windows App SDK 1.4.2: 1.4.231008000
Packaging type
Unpackaged
Windows version
Windows 10 version 22H2 (19045, 2022 Update)
IDE
Visual Studio 2022
Additional context
A sample application with above described issue is also attached. MemoryTest.zip How do we fix this issue? Is there any workaround available to fix this issue? Any help would be highly appreciated.