terminal/src/terminal
Michael Niksa 5220738d8e
Fix VT parser memory leak in tracing (#8618)
Fix memory leak that occurs from not dispatching the end of sequences on all actions (since it is buffering up all characters for trace reasons.) Also don't bother storing if no one is listening.

## PR Checklist
- [x] Closes #8283
* [x] Fixes leak found while bumbling around.
* [x] I work here.

## Detailed Description of the Pull Request / Additional comments
- We trace all the things leading up to the Action phase in the VT parser for ETW tracing to make debugging the parser easier, but we made two mistakes.
- At some point, three of the actions (related to print/execute) weren't dispatching the stored up sequence to tracing and not clearing it. So printing/executing in a giant run over and over caused the vector to bloat and bloat and bloat forever.
- We're storing things even when no one is listening. That's a waste.

## Validation Steps Performed
- Watched it grow every time I did `type big.txt` under `taskman.exe`. Then watched it not do that after.
- I did technically WPR it to figure out this was the culprit.
2021-01-04 17:14:08 +00:00
..
adapter Refactor DEC/ANSI modes to avoid duplication when we add SM/RM (#8469) 2020-12-03 21:51:59 +00:00
input Fix the xterm and SGR mouse encodings for CTRL, ALT, SHIFT (#8379) 2020-11-30 03:45:53 +00:00
parser Fix VT parser memory leak in tracing (#8618) 2021-01-04 17:14:08 +00:00
dirs Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00