Freundlich's C++ toolkit
Public Member Functions
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 More...

Member Function Documentation

◆ operator()()

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

Deletes a pointer using Release

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

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