compact. Collecting garbage

^memory:compact[]

This method collects so-called "garbage" in memory, cleaning it up for reuse by your code.
Garbage is memory no longer used by your code, i.e. to which there are no references in your code.

For example:

$table[^table::
sql{query}]
$table[]
# free up memory occupied by SQL-query result
^memory:compact[]


Parser does not collect garbage automatically leaving decision-making to coder: call
compact from place(s) where you expect greatest benefit, for example before XSL-transformation.

$status:memory will help you fix and find places most favorable for collecting garbage.

Important notice: it is necessary to use local variables as intensely as possible and zero out, which you no longer need. All this will help
compact free up more memory.

Important notice: total memory cleaning is not guaranteed.


Copyright © 1997–2017 Art. Lebedev Studio | http://www.artlebedev.com Last updated: 20.09.2007