Main Index : Reference :
[void] gc()
gc()
forces an immediate garbage collection. Garbage collection frees the memory that is allocated by objects and variables no longer in use by any code. Normally this is done at any time, so one doesn't have to pay attention to it. Sometimes, though, it might be advantageous to force a garbage collection before heavy calculations, just so that it's not done during them.
// The memory allocated for the array is freed.
var a = new(array,1000000);
a = NULL;
gc();