CppGC  1.01
Public Member Functions | Private Attributes
GC::Var< T > Class Template Reference

#include <gc.h>

Inheritance diagram for GC::Var< T >:
GC::Root

List of all members.

Public Member Functions

T & operator* ()
T const & operator* () const
T * operator-> ()
T const * operator-> () const
 operator T * ()
 operator T const * () const
T * operator= (T const *val)
bool operator== (T const *other)
bool operator== (Var< T > const &other)
bool operator!= (T const *other)
bool operator!= (Var< T > const &other)
virtual void mark (MemoryAllocator *allocator)
 Var (T *ptr=NULL)
 Var (Var< T > const &var)

Private Attributes

Rootnext

Detailed Description

template<class T>
class GC::Var< T >

Class for variable, protecting object tree from GC. It should be used instead of normal C++ pointers. If GC is invoked explicitly by gc() or allowGC() methods, then it is necessary to protect accessed objects only before invocation of these methods. If GC is started automatically, then application should be ready that GC can be started at any moment of time and so should always protect all live object from GC by referencing them from Var<T> variables.


Member Function Documentation

template<class T>
virtual void GC::Var< T >::mark ( MemoryAllocator allocator) [inline, virtual]

Mark root object

Parameters:
allocatormemory allocator

Implements GC::Root.


The documentation for this class was generated from the following file: