pfs::SelfDestructPtr< T > Class Template Reference

Utility class that keeps pointer and deletes pointed object when the class is deleted. More...

#include <pfs.h>

List of all members.

Public Member Functions

 SelfDestructPtr (T *ptr=0)
 SelfDestructPtr (const SelfDestructPtr &r)
SelfDestructPtroperator= (const SelfDestructPtr &r)
 ~SelfDestructPtr ()
bool operator== (const SelfDestructPtr &x) const
bool operator!= (const SelfDestructPtr &x) const
T & operator * () const
T * operator-> () const
T * get () const
T * release () const


Detailed Description

template<class T>
class pfs::SelfDestructPtr< T >

Utility class that keeps pointer and deletes pointed object when the class is deleted.

Note that it is not a full implementation of the smart pointer and memory management is not fool proof. You should never store this object as a global variable or a field of a class. These objects should be used only as local variables.

Definition at line 65 of file pfs.h.


The documentation for this class was generated from the following file:
Generated on Tue Nov 25 17:23:48 2008 for Portable Floating-point Streams (pfstools) by  doxygen 1.5.3