How to release CPU memory from Rebol2
When I view DOM's and web pages with %rebol-dom-mdlparser.r and use the clear, recycle/on off functions or over write loaded data, it seems to have no effect on CPU memory usage. Rebol/view crashes. Is there a way possible to release used memory as I browse or must I use multiple interpreters?
posted by: Inetw3 13-Mar-2021/13:37:41-8:00
The normal way is to set a word to NONE. This removes one reference to the underlying series. When the REBOL garbage collector detects that all references are gone, it can recycle the series. So you must find all references, and set them all to NONE.
CLEAR probably doesn't work, because it only resets the length of a reference, not the content of the underlying series it references.
Overwriting would work if you mean setting all the words that reference the series to some other series, so the references are gone and the collector can recycle it. If you mean putting some other data in the same series, that doesn't work, because it doesn't change the size in memory.
posted by: Kaj 8-May-2021/5:17:26-7:00