Arc::CountedPointer< T > Class Template Reference

Wrapper for pointer with automatic destruction and mutiple references. More...

#include <Utils.h>

Data Structures

class  Base

Public Member Functions

T & operator* (void) const
T * operator-> (void) const
 operator bool (void) const
bool operator! (void) const
bool operator== (const CountedPointer &p) const
bool operator!= (const CountedPointer &p) const
bool operator< (const CountedPointer &p) const
T * Ptr (void) const
T * Release (void)

Detailed Description

template<typename T>
class Arc::CountedPointer< T >

Wrapper for pointer with automatic destruction and mutiple references.

If ordinary pointer is wrapped in instance of this class it will be automatically destroyed when all instances refering to it are destroyed. This is useful for maintaing pointers refered from multiple structures wihth automatic destruction of original object when last reference is destroyed. It is similar to Java approach with a difference that desctruction time is strictly defined. Only pointers returned by new() are supported. This class is not thread-safe


The documentation for this class was generated from the following file:
Generated on Wed Jun 27 11:54:22 2012 for Hosting Environment (Daemon) by  doxygen 1.6.3