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 leak in Multi-window scenario #7617

Closed
getrou opened this issue Aug 18, 2022 · 4 comments
Closed

Memory leak in Multi-window scenario #7617

getrou opened this issue Aug 18, 2022 · 4 comments
Assignees
Labels
bug Something isn't working needs-triage Issue needs to be triaged by the area owners product-winui3 WinUI 3 issues team-Rendering Issue for the Rendering team transfer-repo

Comments

@getrou
Copy link
Member

getrou commented Aug 18, 2022

Describe the bug

In a WinAppSDK multi-window scenario, the memory footprint increases even when windows are closed out.

Steps to reproduce the bug

  1. Go to https://github.com/microsoft/WinUI-Samples and clone the repo.
  2. Run MyApp.package.
  3. Take a memory snapshot using VS's diagnostic tools.
  4. Click the "Open Mini" button and then close out all the extra windows that were opened.
  5. Take a second memory snapshot and compare.

Expected behavior

Memory footprint is the same before and after multi-window scenario.

Screenshots

image

NuGet package version

1.2.220727.1-experimental1

Packaging type

Packaged (MSIX)

Windows version

Windows 11 version 21H2 (22000)

IDE

Visual Studio 2022

Additional context

No response

@btueffers btueffers transferred this issue from microsoft/WindowsAppSDK Aug 18, 2022
@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Aug 18, 2022
@codendone codendone added bug Something isn't working team-Rendering Issue for the Rendering team product-winui3 WinUI 3 issues and removed needs-triage Issue needs to be triaged by the area owners labels Aug 19, 2022
@danielancines
Copy link

I've been making some tests here, and the problem appears to be in a Window object that still forever allocated, in my tests, even I closed New Window and check if it removed from App.Current.Windows collection, the object never will be collect by GC and I cannot find who is locking up on the object tree. Unfortunately I didn't find any workaround for this issue, do you guys have any idea?

@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@JJBrychell
Copy link

There has been a lot of work on the shutdown process in 1.4 and we hope that that has addressed this issue. If this still continues to occur under 1.4, please feel free to reopen.

@rodirigos
Copy link

Still happening in dotnet8.

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage Issue needs to be triaged by the area owners product-winui3 WinUI 3 issues team-Rendering Issue for the Rendering team transfer-repo
Projects
None yet
Development

No branches or pull requests

7 participants