Skip to content
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

Memory leaks on navigation #9044

Closed
branislavjuhas opened this issue Jul 17, 2023 · 3 comments
Closed

Memory leaks on navigation #9044

branislavjuhas opened this issue Jul 17, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@branislavjuhas
Copy link

Which version of the app?

WinUI 3 Gallery

Description

Memory used by application is constantly increasing reaching values 8 times the initial memory required when navigaing. To reproduce this bug, click through the elements in navigation pane (navigate through different pages a lot of times).

Screenshots

image

Windows version

Windows 11 22H2 (22621)

Additional context

No response

@branislavjuhas branislavjuhas added the bug Something isn't working label Jul 17, 2023
@marcelwgn
Copy link
Contributor

I'm inclined to say that there isn't actually a memory leak. While the consumption increases, it also decreases. C++/WinRT seems to quite slow with releasing objects it created, however if you create memory pressure the memory does get released. I used testlimit64.exe -d 16024 -c 1 to increase memory usage on my machine and the WinUI Gallery jumped from 500MB in usage to 75MB.

@marcelwgn
Copy link
Contributor

@bpulliam What are your thoughts on this?

@ranjeshj
Copy link
Contributor

@chingucoding @BrancheyJuhas this is by design. The garbage collector will not cleanup if there is plenty of memory to work with. That does not mean the app is leaking. You can force a GC collect or put memory pressure to force GC to run which works as @chingucoding noticed above. If you see a monotonous increase without ever going back down, then there is likely a leak.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants