Consider making conhost internal interfaces derive form IUnknown, be COM-like #10388
Labels
Area-CodeHealth
Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.
Issue-Task
It's a feature request, but it doesn't really need a major design.
Priority-3
A description (P3)
Product-Conhost
For issues in the Console codebase
Milestone
This would solve a bunch of our internal ownership issues in a way that's slightly better than "sometimes it has a
shared_ptr
, but the class doesn't know".Depending on which runtimeclass implementation we use, we could also get weak references. We could also just use non-owning pointers where there would be a reference cycle.
Consider:
IUiaData
-- this would also help clear up ownership in Terminal between TermControl and TermControlFrameworkAutomationPeerIRenderData
IControlAccessibilityInfo
IUiaEventDispatcher
ITerminalApi
andITerminalInput
?IConsoleWindow
,IHighDpiApi
,IConsoleControl
,IConsoleInputThread
,IWindowMetrics
, etc.IRenderEngine
IRenderTarget
IRenderThread
(let the renderer keep itself alive if necessary, fix some ownership issues with render engines and render base)The text was updated successfully, but these errors were encountered: