[PR #914] [MERGED] Fix memory leak, use unique_ptr for Core::Terminal object, #875 #24392

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/914
Author: @dreamer-dead
Created: 5/21/2019
Status: ✅ Merged
Merged: 5/21/2019
Merged by: @adiviness

Base: master ← Head: fix-memory-leak-terminal-object


📝 Commits (1)

  • e855719 Fix memory leak, use unique_ptr for Core::Terminal object

📊 Changes

2 files changed (+3 additions, -3 deletions)

View changed files

📝 src/cascadia/TerminalControl/TermControl.cpp (+2 -2)
📝 src/cascadia/TerminalControl/TermControl.h (+1 -1)

📄 Description

Use unique_ptr for Core::Terminal object to delete it correctly.

Related to #875, #745

PR Checklist

  • Closes #xxx
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

This is a fix for one allocation site from the bug #875, but it may be related to the #745
Just use std::unique_ptr<> to hold a Terminal object.


🔄 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/914 **Author:** [@dreamer-dead](https://github.com/dreamer-dead) **Created:** 5/21/2019 **Status:** ✅ Merged **Merged:** 5/21/2019 **Merged by:** [@adiviness](https://github.com/adiviness) **Base:** `master` ← **Head:** `fix-memory-leak-terminal-object` --- ### 📝 Commits (1) - [`e855719`](https://github.com/microsoft/terminal/commit/e8557197f802be102410cb4189dfffa87458efbc) Fix memory leak, use unique_ptr for Core::Terminal object ### 📊 Changes **2 files changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+2 -2) 📝 `src/cascadia/TerminalControl/TermControl.h` (+1 -1) </details> ### 📄 Description <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Use unique_ptr for Core::Terminal object to delete it correctly. Related to #875, #745 <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [ ] Closes #xxx * [ ] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Requires documentation to be updated * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx ## Detailed Description of the Pull Request / Additional comments This is a fix for one allocation site from the bug #875, but it may be related to the #745 Just use `std::unique_ptr<>` to hold a `Terminal` object. --- <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:03:00 +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#24392