ScummVM API documentation
asCGarbageCollector Class Reference

Classes

struct  asSIntTypePair
 
struct  asSObjTypePair
 

Public Member Functions

int GarbageCollect (asDWORD flags, asUINT iterations)
 
void GetStatistics (asUINT *currentSize, asUINT *totalDestroyed, asUINT *totalDetected, asUINT *newObjects, asUINT *totalNewDestroyed) const
 
void GCEnumCallback (void *reference)
 
int AddScriptObjectToGC (void *obj, asCObjectType *objType)
 
int GetObjectInGC (asUINT idx, asUINT *seqNbr, void **obj, asITypeInfo **type)
 
int ReportAndReleaseUndestroyedObjects ()
 

Public Attributes

asCScriptEngineengine
 
asCIRCULARREFFUNC_t circularRefDetectCallbackFunc
 
void * circularRefDetectCallbackParam
 

Protected Types

enum  egcDestroyState { destroyGarbage_init = 0, destroyGarbage_loop, destroyGarbage_haveMore }
 
enum  egcDetectState {
  clearCounters_init = 0, clearCounters_loop, buildMap_init, buildMap_loop,
  countReferences_init, countReferences_loop, detectGarbage_init, detectGarbage_loop1,
  detectGarbage_loop2, verifyUnmarked_init, verifyUnmarked_loop, breakCircles_init,
  breakCircles_loop, breakCircles_haveGarbage
}
 
typedef asSMapNode< void *, asSIntTypePairasSMapNode_t
 

Protected Member Functions

int DestroyNewGarbage ()
 
int DestroyOldGarbage ()
 
int IdentifyGarbageWithCyclicRefs ()
 
asSObjTypePair GetNewObjectAtIdx (int idx)
 
asSObjTypePair GetOldObjectAtIdx (int idx)
 
void RemoveNewObjectAtIdx (int idx)
 
void RemoveOldObjectAtIdx (int idx)
 
void MoveObjectToOldList (int idx)
 
void MoveAllObjectsToOldList ()
 
asSMapNode_tGetNode (void *obj, asSIntTypePair it)
 
void ReturnNode (asSMapNode_t *node)
 

Protected Attributes

asCArray< asSObjTypePairgcNewObjects
 
asCArray< asSObjTypePairgcOldObjects
 
asCArray< void * > liveObjects
 
asCMap< void *, asSIntTypePairgcMap
 
egcDestroyState destroyNewState
 
egcDestroyState destroyOldState
 
asUINT destroyNewIdx
 
asUINT destroyOldIdx
 
asUINT numDestroyed
 
asUINT numNewDestroyed
 
egcDetectState detectState
 
asUINT detectIdx
 
asUINT numDetected
 
asUINT numAdded
 
asUINT seqAtSweepStart [3]
 
asSMapNode_tgcMapCursor
 
bool isProcessing
 
asCArray< asSMapNode_t * > freeNodes
 

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