Skip to content

Commit 2015788

Browse files
authored
Workaround C++/WinRT's multi-level composition class refcount issue (#1342)
* Workaround C++/WinRT's multi-level composition class refcount issue Fixes #1339.
1 parent 1ac7e65 commit 2015788

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/cascadia/TerminalApp/App.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ namespace winrt::TerminalApp::implementation
5151
// then it might look like App just failed to activate, which will
5252
// cause you to chase down the rabbit hole of "why is App not
5353
// registered?" when it definitely is.
54+
55+
// See GH#1339. This is a workaround for MSFT:22116519
56+
// We need this to prevent an occasional crash on teardown
57+
AddRef();
58+
m_inner.as<::IUnknown>()->Release();
5459
}
5560

5661
// Method Description:

0 commit comments

Comments
 (0)