[REBOL] Re: recycle
From: anton:lexicon at: 17-Apr-2002 0:29
Recycle will not free memory which is still referenced
by some word.
So, if you close your window, but you have set a word
to one of your buttons (or fields etc.) in that window, then
the window will not be freed because the button's 'parent
facet will be referring to the window.
lay: layout [
(Layout sets b/parent to lay.)
If you do this:
lay is still referred to via b/parent.
Therefore, you need to also:
I haven't checked this. 'lay and 'b may be
referenced elsewhere in the view/VID system
(and so would not be freed).
For another example, if you use 'load-image
to load some images, they will not be recycled
because there is a reference to them in the
image cache that load-image maintains.
(See the source.)
I almost never use recycle.
The recycler is automatically on by default, so you
shouldn't have to think about it unless you have
To free all the memory you must try to unset
all the words which you have set running the
A few people here know how to check the words
before and after running a program and can
get the difference (ie. the words that were set).
Check out this cool memory information program by DocKimbel.
I've never more than tinkered with it but I am glad it's
there in case I need it some day.
Good questions, by the way.