RECYCLE

Syntax

RECYCLE

(RECYCLE "TRUE)

Explanation

RECYCLE causes Logo to perform a garbage collection which frees memory by clearing information that is no longer in use. Unless RECYCLE is used, Logo normally performs a garbage collection when memory is no longer available. When programming time-dependent procedures, such as a melody, use RECYCLE at a point in the procedures that a garbage collection delay will not interfere with your program. Otherwise Logo carries out a garbage collection whenever one is necessary. It takes a second or longer to perform a garbage collection which can cause delays in running programs.

At toplevel, RECYCLE outputs the number of free nodes. When RECYCLE is given the argument TRUE and both it and its argument are enclosed in parentheses, recycle outputs the number of free slots for symbols and numbers, the number of free list elements and the available memory, both locally and globally. See also NODES.

Example

? RECYCLE

Result: 4998

? (RECYCLE "TRUE)

Recycle #3

Symbols and numbers: 3587

List elements: 5884

Workspace memory: 200014 bytes

Global heep: 2599552 bytes

Result: 1884

?