STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ... ATLSTL - Template Software for the Active Template Library COMSTL - The Standard Template Library meets the Component Object Model .netSTL - Standard Template Library meets the Microsoft.NET Common Language Runtime InetSTL - The Standard Template Library meets WinInet MFCSTL - Template Software for the Microsoft Foundation Classes UNIXSTL - Template Software for the UNIX Operating System WinSTL - where the Standard Template Library meets the Win32 API

Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

COM Reference Management Functions
[COMSTL]

These functions assist in the management of object reference counts. More...

Compounds

class  interface_ptr
 Manages a COM interface pointer, ensuring that it is released. More...


Functions

void addref (LPUNKNOWN punk)
 Adds a reference on the interface pointer.

void release (LPUNKNOWN punk)
 Releases a reference on the interface pointer.

void safe_addref (LPUNKNOWN punk)
 Adds a reference on the interface pointer.

void safe_release (LPUNKNOWN punk)
 Releases a reference on the interface pointer.

template<typename T> void release_set_null (T *&pt)
 Releases a reference on the interface pointer, and resets the pointer.


Detailed Description

These functions assist in the management of object reference counts.


Function Documentation

void addref LPUNKNOWN    punk [inline]
 

Adds a reference on the interface pointer.

Parameters:
punk  The interface pointer on which to add the reference. Cannot be null

void release LPUNKNOWN    punk [inline]
 

Releases a reference on the interface pointer.

Parameters:
punk  The interface pointer on which to release the reference. Cannot be null

void release_set_null T *&    pt [inline]
 

Releases a reference on the interface pointer, and resets the pointer.

Parameters:
pt  The interface pointer on which to release the reference. Can be null

void safe_addref LPUNKNOWN    punk [inline]
 

Adds a reference on the interface pointer.

Parameters:
punk  The interface pointer on which to add the reference. Can be null

void safe_release LPUNKNOWN    punk [inline]
 

Releases a reference on the interface pointer.

Parameters:
punk  The interface pointer on which to release the reference. Can be null

STLSoft Libraries documentation © Synesis Software Pty Ltd, 2001-2004