Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
GCManager Class Referenceabstract

#include <elm/alloc/AbstractGC.h>

Public Member Functions

virtual ~GCManager ()
 
virtual void collect (AbstractGC &gc)=0
 
virtual void clean (void *p)
 

Detailed Description

Provides an interface between a cooperative garbage collector (CGC) and the application. In ELM, each CGC uses a manager (a) to provide the alive blocks (using function collect()) and to safely clean up the fried objects (using function clean()).

Constructor & Destructor Documentation

◆ ~GCManager()

~GCManager ( )
virtual

Member Function Documentation

◆ clean()

void clean ( void p)
virtual

Called for each fried object. This function let the application call the destructor of allocated objects. The default implementation does nothing.

Parameters
pPointer to object to destruct.

Referenced by ListGC::clean(), and ListGC::runGC().

◆ collect()

void collect ( AbstractGC gc)
pure virtual

Called at the start of a garbage collection cycle, this function has to call the mark() function of the garbage collection gc with each alive object.

Parameters
gcCurrent garbage collector.

Referenced by ListGC::runGC().


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