Falcon::GarbagePointer Class Reference

Implements a generic garbage shell for inner data. More...

#include <garbagepointer.h>

Inheritance diagram for Falcon::GarbagePointer:

Inheritance graph

List of all members.

Public Member Functions

virtual bool finalize ()
 Performs pre-delete finalization of the object.
 GarbagePointer (FalconData *p)
 Creates the garbage pointer.
virtual void gcMark (uint32 gen)
 Applies mark to subclasses.
FalconDataptr () const
 Returns the inner data stored in this garbage pointer.
virtual ~GarbagePointer ()

Detailed Description

Implements a generic garbage shell for inner data.

This pointer can be used to wrap FalconData derived classes into garbage sensible behavior.

In this way, it's possible to bless simple pointers to FalconData managed internally by VM or inner routines, and let them to live in the wild. They will be marked when reachable and disposed cleanly when not reachable anymore.

GarbagePointer can be set directly into items (they are the "user pointer" items).

Constructor & Destructor Documentation

Falcon::GarbagePointer::GarbagePointer ( FalconData p  )  [inline]

Creates the garbage pointer.

Must be filled with the data guarded falcon data

References Falcon::FalconData::isSequence().

virtual Falcon::GarbagePointer::~GarbagePointer (  )  [inline, virtual]


The guard will destroy its content with it.

Member Function Documentation

virtual bool Falcon::GarbagePointer::finalize (  )  [inline, virtual]

Performs pre-delete finalization of the object.

If this function returns false, then the destructor is called. If it returns true, it means that the finalizer has somewhat reclaimed the memory in a clean way (i.e. deleting itself), so the delete on this garbageable won't be called.

true to prevent destructor to be applied on this garbageable.

Reimplemented from Falcon::GarbageableBase.

virtual void Falcon::GarbagePointer::gcMark ( uint32  mk  )  [inline, virtual]

Applies mark to subclasses.

By default, this method just changes the mark() value.

Subclasses having deep data may overload this to take care of marking it.

Reimplemented from Falcon::Garbageable.

FalconData* Falcon::GarbagePointer::ptr (  )  const [inline]

Returns the inner data stored in this garbage pointer.

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

Generated on Mon Oct 19 10:11:36 2009 for Falcon_Core by  doxygen 1.5.8