RAII owning pointer for COM objects.
An alias for std::unique_ptr<T, ComObjDeleter<T>> that automatically calls T::Release() when the pointer goes out of scope. Ownership semantics are identical to std::unique_ptr: the type is move-only and non-copyable, ensuring that a COM object's reference count is never accidentally incremented by a copy
Typical usage
std::unique_ptr< T, ComObjDeleter< T > > unique_com_ptr
RAII owning pointer for COM objects.
- Template Parameters
-
| T | A COM interface type that exposes a Release() method. |
- See also
- ComObjDeleter
Definition at line 55 of file unique_com_ptr.hpp.