auto-compact. Automatic garbage collection [3.4.6]

^memory:auto-compact(collection frequency)

The method configures automatic garbage collection mode.
Argument, integer from 0 to 5, specifies automatic garbage collection frequency:
·0 - automatic garbage collection is disabled (by default, ^memory:compact[] should be called manually).  
·1 - minimum collection frequency (faster, but more memory is used).  
...
·5 - maximum collection frequency (slower, but less memory is used).  

Frequent garbage collections slow code execution by tens of percent. Garbage is memory no longer used by your code, i.e. to which there are no references in your code.



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