[PR #16597] Eliminate two memory leaks #30951

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

Original Pull Request: https://github.com/microsoft/terminal/pull/16597

State: closed
Merged: Yes


In WindowsTerminal, there was a leak of a BSTR with every call to
ITextRangeProvider::GetText, and a failure to call VariantClear in
ITextRange::GetAttributeValue when the value stored in the variant is
VT_BSTR. These were fixed by switching to wil::unique_bstr and
wil::unique_variant.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/16597 **State:** closed **Merged:** Yes --- In WindowsTerminal, there was a leak of a BSTR with every call to ITextRangeProvider::GetText, and a failure to call VariantClear in ITextRange::GetAttributeValue when the value stored in the variant is VT_BSTR. These were fixed by switching to wil::unique_bstr and wil::unique_variant.
claunia added the pull-request label 2026-01-31 09:44:02 +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#30951