Fix TerminalPage not being released on window close (#17107)

Because this holds onto the root element, `TerminalPage` gets "leaked"
on Windows 10 when a window is closed until another is opened.

## Validation Steps Performed
* Set a breakpoint in `Renderer::~Renderer`
* Open and close a window
* Breakpoint used to not get hit and now it does 
This commit is contained in:
Leonard Hecker 2024-04-23 18:18:12 +02:00 committed by GitHub
parent 19c24aced9
commit a590a1bff0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 3 deletions

View File

@ -405,8 +405,6 @@ bool NonClientIslandWindow::Initialize()
// - <none>
void NonClientIslandWindow::SetContent(winrt::Windows::UI::Xaml::UIElement content)
{
_clientContent = content;
_rootGrid.Children().Append(content);
// SetRow only works on FrameworkElement's, so cast it to a FWE before

View File

@ -58,7 +58,6 @@ private:
std::optional<til::point> _oldIslandPos;
winrt::TerminalApp::TitlebarControl _titlebar{ nullptr };
winrt::Windows::UI::Xaml::UIElement _clientContent{ nullptr };
wil::unique_hbrush _backgroundBrush;
til::color _backgroundBrushColor;