Skip to content

Commit

Permalink
[ainulindale] Clean tear down the App when the process exits
Browse files Browse the repository at this point in the history
  • Loading branch information
zadjii-msft committed Feb 3, 2023
1 parent 713ea71 commit 57d1dd4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/cascadia/WindowsTerminal/WindowEmperor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ WindowEmperor::WindowEmperor() noexcept :
});
}

WindowEmperor::~WindowEmperor()
{
_app.Close();
_app = nullptr;
}

void _buildArgsFromCommandline(std::vector<winrt::hstring>& args)
{
if (auto commandline{ GetCommandLineW() })
Expand Down
1 change: 1 addition & 0 deletions src/cascadia/WindowsTerminal/WindowEmperor.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class WindowEmperor
{
public:
WindowEmperor() noexcept;
~WindowEmperor();
bool ShouldExit();
void WaitForWindows();

Expand Down

0 comments on commit 57d1dd4

Please sign in to comment.