diff --git a/include/boost/stacktrace/detail/backend_windows.hpp b/include/boost/stacktrace/detail/backend_windows.hpp index 8bfd61a..9701c70 100644 --- a/include/boost/stacktrace/detail/backend_windows.hpp +++ b/include/boost/stacktrace/detail/backend_windows.hpp @@ -46,22 +46,14 @@ public: return !!holder_; } - void reset() const BOOST_NOEXCEPT { + ~com_holder() BOOST_NOEXCEPT { if (holder_) { holder_->Release(); } } - - ~com_holder() BOOST_NOEXCEPT { - reset(); - } }; inline bool try_init_com(com_holder& idebug_) BOOST_NOEXCEPT { - if (idebug_.is_inited()) { - return true; - } - CoInitializeEx(0, COINIT_MULTITHREADED); com_holder iclient; @@ -86,7 +78,6 @@ inline bool try_init_com(com_holder& idebug_) BOOST_NOEXCEPT { const bool res = (S_OK == iclient->QueryInterface(__uuidof(IDebugSymbols), idebug_.to_void_ptr_ptr())); if (!res) { - idebug_.reset(); return false; }