pacemaker 1.0.1
COM automation for people with deadlines and a hatred of GUIs
 
Loading...
Searching...
No Matches
ComObjDeleter< T > Struct Template Reference

Custom deleter for COM objects. More...

#include <unique_com_ptr.hpp>

Public Member Functions

void operator() (T *ptr)
 Release the COM object.
 

Detailed Description

template<class T>
struct pacemaker::inca::detail::ComObjDeleter< T >

Custom deleter for COM objects.

Calls Release() on the managed pointer when it is non-nullptr, satisfying the COM reference-counting contract without requiring explicit cleanup at every call site.

Template Parameters
TA COM interface type that exposes a Release() method.

Definition at line 18 of file unique_com_ptr.hpp.

Member Function Documentation

◆ operator()()

template<class T >
void operator() ( T * ptr)
inline

Release the COM object.

If ptr is non-nullptr, ptr->Release() is called. A nullptr is silentrly ignored, matching the behaviour of delete nullptr.

Parameters
ptrRaw pointer to the COM object to release. May be nullptr.

Definition at line 28 of file unique_com_ptr.hpp.


The documentation for this struct was generated from the following file: