#include <gc_ptr.hh>
Suitable to be used with STL container classes.
Public Member Functions | |
gc_ptr (T *p=0) | |
void | resetFromExisting (T *ptr) |
Use with care. | |
gc_ptr (const gc_ptr< T, TM > &p) throw () | |
gc_ptr (const gc_ptr_ref< T, TM > &p) throw () | |
gc_ptr< T, TM > & | operator= (const gc_ptr< T, TM > &p) throw () |
T & | operator * () const throw () |
T * | operator-> () const throw () |
T * | get () const throw () |
bool | isNull () const throw () |
void | reset (T *ptr=0) throw () |
bool | operator< (const gc_ptr< T > &a) const |
template<class Y> | |
o () throw () | |
Protected Member Functions | |
void | dispose () throw () |
Static Protected Member Functions | |
static usg_cnt * | newUsageCounter (const T *p) |
Protected Attributes | |
T * | d_ptr |
usg_cnt * | d_usg |
void fatalmind::gc_ptr< T, TM >::resetFromExisting | ( | T * | ptr | ) | [inline] |
Use with care.
Can be used to re-create a gc_ptr out of an pointer to an object which is owned by another gc_ptr's BUT is derived from usg_cnt_t so that it is known where the counter is.
will casue undefined behviour if applied to objects on the stack