Movie::ForceCollectGarbage

Movie::ForceCollectGarbage
virtual void ForceCollectGarbage(unsigned gcFlags = GCF_Full) = 0;
Description

ForceCollectGarbage is used to force garbage collector execution by the user's application. It does nothing, if garbage collection is disabled. By default, the garbage collection is enabled. 

Garbage collection functionality has been included to prevent memory leaks caused by circular references where two or more objects have reference to each other. The following example shows a piece of code that produce memory leak unless one of the object references is explicitly disconnected:

   var o1 = new Object;
   var o2 = new Object;
   o1.a = o2;
   o2.a = o1;
Parameters
Parameters 
Description 
unsigned gcFlags = GCF_Full 
'gcFlags' parameter allows to control the speed of GC. GCF_Quick is fastest but less memory is recovered, whereas GCF_Full is slowest but all possible memory is recovered.