4.6.0
Freundlich's C++ toolkit
Loading...
Searching...
No Matches
fcppt::com_deleter Struct Reference

Detailed Description

A deleter that uses the Release member function to destroy an object.

COM objects have a reference counting mechanism where calling Release on them decrements the reference counter. This mechanism is enabled by deriving from IUnknown

Public Member Functions

template<typename T >
void operator() (T *const _ptr) const
 Deletes a pointer using Release
 

Member Function Documentation

◆ operator()()

template<typename T >
void fcppt::com_deleter::operator() ( T *const _ptr) const
inline

Deletes a pointer using Release

Calls _ptr->Release() if _ptr is not NULL

Parameters
_ptrThe pointer to delete, can be NULL
Template Parameters
TMust derive from IUnknown