microsoft/Terminal
GitHub で見るMissing operator delete/delete[] for some allocated objects
Open
#875 opened on 2019年5月17日
Area-CodeHealthHelp WantedIssue-BugProduct-Conhost
Repository metrics
- Stars
- (35,764 stars)
- PR merge metrics
- (平均マージ 27d 19h) (30d で 24 merged PRs)
説明
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:
- raw
operator newwithoutoperator deletelike this https://github.com/Microsoft/Terminal/blob/master/src/cascadia/TerminalConnection/ConptyConnection.cpp#L191 - allocation by
operator newsome global object or class member (https://github.com/Microsoft/Terminal/blob/master/src/cascadia/TerminalControl/TermControl.cpp#L281) - allocation by
operator newsome memory in a function and return it by raw pointer, which can leak then.
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?