You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(power): balance windows COM init with CoUninitialize (RAII guard)
C-P2-6: the Windows metered-network detect_metered called CoInitializeEx on
every 30s poll but never CoUninitialize, leaking a COM apartment refcount. Added
a ComInitGuard RAII type that calls CoUninitialize on drop, armed ONLY when our
CoInitializeEx returned success (S_OK or S_FALSE, both is_ok() and both owing an
uninit). RPC_E_CHANGED_MODE (the thread was already initialised differently) is
still tolerated and is NOT balanced (we did not perform that init); any other
hard init failure aborts with no uninit owed. cfg(windows)-gated so non-Windows
clippy sees no dead code.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012CyiRqk2DVwmJjEu5gcD1m
0 commit comments