microsoft / microsoft/terminal

Missing operator delete/delete[] for some allocated objects

Open
#875 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-CodeHealth Help Wanted Issue-Bug Product-Conhost
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

Hi.

Looks like there are few places in the Terminal code where I can suspect a memory leaks due to missing operator delete or operator delete[].
These allocation sites can be grouped into following:

Here is my gist with quite a simple grep foroperator new calls - https://gist.github.com/dreamer-dead/c43248466fc4d445378b4dfba80d8d25

Is this an intentional behaviour or a bug that should be fixed?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the allocation sites identified in ConptyConnection.cpp around line 191 and TermControl.cpp around line 281, then compare them with the linked grep results. Determine whether each raw allocation has an appropriate owner and matching deletion, and whether the behavior is intentional. Done means documenting the conclusion or addressing confirmed leaks across the listed sites.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.