mirror of
https://github.com/microsoft/terminal.git
synced 2026-07-08 17:46:05 +00:00
## Summary of the Pull Request
This includes the memory leak fixes that @lhecker and I investigated as
a part of #19710.
The `ITextRangeProvider`s (namely `UiaTextRange`s) weren't being
destroyed after they were done being used by the screen reader.
## Validation Steps Performed
In my own testing, I set a breakpoint on the destructor for
`UiaTextRangeBase`. Prior to this change, that destructor would mainly
be called when the terminal control was closed, which would result in us
leaking these objects. With this change, I've confirmed that these text
ranges are being destroyed immediately after they are done being used
(without needing to close the terminal control).
## PR Checklist
Closes #19710
(cherry picked from commit e2110e716c)
Service-Card-Id: PVTI_lADOAF3p4s4BBcTlzgnCP0M
Service-Version: 1.24