Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

ixion::no_free_ref Class Template Reference

#include <ixlib_garbage.hh>

Inheritance diagram for ixion::no_free_ref::

ixion::ref_base List of all members.

Public Methods

 no_free_ref (no_free_ref const &src)
template<class T2>  no_free_ref (ref< T2, T_Managed > const &src)
template<class T2>  no_free_ref (no_free_ref< T2, T_Managed > const &src)
 no_free_ref (T *instance=NULL)
 ~no_free_ref ()
no_free_ref & operator= (no_free_ref const &src)
no_free_ref & operator= (T *ptr)
void release ()
void set (T *instance)
T * releaseFromGCArena ()

Detailed Description

template<class T, class T_Managed>
class ixion::no_free_ref< T, T_Managed >

An object that acts like a reference-counted pointer to an object. However, the referenced object is not freed if the no_free_ref is the last reference to the object to go out of scope.

This is useful to pass objects allocated e.g. on the stack along inside ref's, while making sure they aren't freed. (which would most probably lead to disaster)

no_free_ref's are mostly a hack, but there are situations where you cannot avoid them. But even so, you should try not to use them where possible.

The corresponding reference_manager is identified implicitly through static references.

Definition at line 197 of file ixlib_garbage.hh.


Constructor & Destructor Documentation

template<class T, class T_Managed>
ixion::no_free_ref< T, T_Managed >::no_free_ref no_free_ref< T, T_Managed > const &    src [inline]
 

Definition at line 201 of file ixlib_garbage.hh.

template<class T, class T_Managed>
template<class T2>
ixion::no_free_ref< T, T_Managed >::no_free_ref ref< T2, T_Managed > const &    src [inline]
 

Definition at line 206 of file ixlib_garbage.hh.

template<class T, class T_Managed>
template<class T2>
ixion::no_free_ref< T, T_Managed >::no_free_ref no_free_ref< T2, T_Managed > const &    src [inline]
 

Definition at line 211 of file ixlib_garbage.hh.

template<class T, class T_Managed>
ixion::no_free_ref< T, T_Managed >::no_free_ref T *    instance = NULL [inline]
 

Definition at line 215 of file ixlib_garbage.hh.

template<class T, class T_Managed>
ixion::no_free_ref< T, T_Managed >::~no_free_ref   [inline]
 

Definition at line 219 of file ixlib_garbage.hh.


Member Function Documentation

template<class T, class T_Managed>
no_free_ref& ixion::no_free_ref< T, T_Managed >::operator= T *    ptr [inline]
 

Definition at line 228 of file ixlib_garbage.hh.

template<class T, class T_Managed>
no_free_ref& ixion::no_free_ref< T, T_Managed >::operator= no_free_ref< T, T_Managed > const &    src [inline]
 

Definition at line 224 of file ixlib_garbage.hh.

template<class T, class T_Managed>
void ixion::no_free_ref< T, T_Managed >::release   [inline]
 

Definition at line 234 of file ixlib_garbage.hh.

template<class T, class T_Managed>
T* ixion::no_free_ref< T, T_Managed >::releaseFromGCArena   [inline]
 

Definition at line 245 of file ixlib_garbage.hh.

template<class T, class T_Managed>
void ixion::no_free_ref< T, T_Managed >::set T *    instance [inline]
 

Definition at line 238 of file ixlib_garbage.hh.

Referenced by operator=().


The documentation for this class was generated from the following file:
Generated on Wed Oct 31 17:12:25 2001 for ixlib by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001