[PR #15337] [MERGED] Fix WindowEmperor exiting too early #30597

Open
opened 2026-01-31 09:41:47 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/15337
Author: @lhecker
Created: 5/12/2023
Status: Merged
Merged: 5/12/2023
Merged by: @microsoft-github-policy-service[bot]

Base: mainHead: dev/lhecker/15306-shutdown-fix


📝 Commits (1)

  • ce9b3e6 Fix WindowEmperor exiting too early

📊 Changes

4 files changed (+24 additions, -12 deletions)

View changed files

📝 src/cascadia/WindowsTerminal/WindowEmperor.cpp (+18 -8)
📝 src/cascadia/WindowsTerminal/WindowEmperor.h (+2 -1)
📝 src/cascadia/WindowsTerminal/WindowThread.cpp (+3 -2)
📝 src/cascadia/WindowsTerminal/WindowThread.h (+1 -1)

📄 Description

WindowEmperor would exit as soon as the last window would enter
RundownForExit(), which is too early and triggers leak checks.
This commit splits up the shutdown up into deregistering the window from
the list of windows and into actually decrementing the window count.

Closes #15306

Validation Steps Performed

  • D2D leak warnings seem to disappear

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/15337 **Author:** [@lhecker](https://github.com/lhecker) **Created:** 5/12/2023 **Status:** ✅ Merged **Merged:** 5/12/2023 **Merged by:** [@microsoft-github-policy-service[bot]](https://github.com/apps/microsoft-github-policy-service) **Base:** `main` ← **Head:** `dev/lhecker/15306-shutdown-fix` --- ### 📝 Commits (1) - [`ce9b3e6`](https://github.com/microsoft/terminal/commit/ce9b3e6669c1a1f008178a564a8ca8d325fdffa2) Fix WindowEmperor exiting too early ### 📊 Changes **4 files changed** (+24 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/WindowsTerminal/WindowEmperor.cpp` (+18 -8) 📝 `src/cascadia/WindowsTerminal/WindowEmperor.h` (+2 -1) 📝 `src/cascadia/WindowsTerminal/WindowThread.cpp` (+3 -2) 📝 `src/cascadia/WindowsTerminal/WindowThread.h` (+1 -1) </details> ### 📄 Description `WindowEmperor` would exit as soon as the last window would enter `RundownForExit()`, which is too early and triggers leak checks. This commit splits up the shutdown up into deregistering the window from the list of windows and into actually decrementing the window count. Closes #15306 ## Validation Steps Performed * D2D leak warnings seem to disappear ✅ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:41:47 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30597