Name
CollectGarbage -- force a garbage collection or set new threshold (V2.0)
Synopsis
CollectGarbage([threshold])
Function
This function can be used to force a garbage collection. To do that, you have to call CollectGarbage() without specifying the optional argument threshold. If you pass the optional threshold argument, however, then this value will be set as the new garbage collector threshold. This means that whenever the garbage size is bigger than the specified threshold in kilobytes, Hollywood will automatically run the garbage collector.

If you leave out the optional argument, Hollywood will immediately run the garbage collector and set a new threshold that is twice the size of garbage just collected.

To get information about the state of the garbage collector, call the GCInfo() function.

Inputs
threshold
optional: threshold in kilobytes that specifies when Hollywood should run the garbage collector (defaults to 0 which means run the garbage collector immediately)

Show TOC