gc

gc — runs the garbage collector.

Syntax

gc ()
    

Arguments

none

Returns

The number of cells freed by the garbage collector.

Description

Causes the garbage collector to run if possible. The garbage collector will not run during a timer or signal handler, but it will flag the need for garbage collection, causing the garbage collector to run immediately after the timer or signal handler exits.

Example

Gamma> gc();
68
Gamma> gc();
17
Gamma> fp = open("myfile.dat", "r", nil);
#<File:"myfile.dat">
Gamma> close(fp);
t
Gamma> gc();
67
Gamma> gc();
17
Gamma> 
		

See Also

allocated_cells, free_cells