xHarbour Reference Documentation > Function Reference |
Scans the memory and releases all garbage memory blocks.
HB_GCAll( [<lForce>] ) --> NIL
The return value is always NIL.
xHarbour's garbage collector is normally invoked automatically during idle states. An idle state is the state of the xHarbour virtual machine (VM) when it waits for user input from the keyboard or the mouse. The VM enters idle state during Inkey() calls. All applications that do not use Inkey() function calls can signal the idle state with a call to the HB_IdleState() function.
Alternatively, garbage collection can be enforced programmatically with HB_GCAll(.T.). This can be advantageous when there is massive use of memory during a loop, for exemple, that includes no user input and no idle state is signalled.
See also: | HB_GCStep(), HB_IdleState(), Memory() |
Category: | Debug functions , Environment functions , xHarbour extensions |
Source: | vm\garbage.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
http://www.xHarbour.com