Context: microsoft/microsoft-ui-xaml#7282 (comment)
This is the Windows App SDK C# template, on top of which I have
- Removed x:Name
- Added a button to open and Activate() a new MainWindow
- Added a button to call Close() on the enclosing MainWindow
- Steps to reproduce this behavior are to
- Build the Packaging project (both Debug and Release feature the issue)
- Run the program with the debugger attached, to view memory usage information in VS
- Alternatively, you can use Task Manager to track memory usage
- Open one or more new windows
- Observe that the memory usage increases as each new window is opened
- Close several windows
- Observe that the memory associated with the window is not freed