Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Deleting / Unsetting Hierachical Objects / Faces

From: james:mustard at: 20-Dec-2001 10:01

Volker wrote:
> Usually dont reference it and let gc do the work.
GC wasn't doing the work :)
> but functions hold the arguments of their last call in current rebol. > its freed when they are called again. > with few large objects this is wastefull. > clearing the tops levels of such a object/block might help.
Yup - that is what i resorted to.
> also there is 'load-image, which keeps a cache with all > loaded images and looks there first. > i expect rebol uses it internal. > it has an option /clear to clear it.
I didnt use this as i created my own image cache because I needed finer control over the structure.
> ---for referencing: > why don't you use objects of objects? > even if thats one-field objects like > make object![value: something] > this style is used in /view everywhere > (like writing face/text the long way.. instead of hacking to use the 'text
somehow). That's exactly what I did do :) my-object: context [ img: make object! [ img-path: none img-file: none image: none ] image-bank: make object! [ images: copy [] make-images: func [image-path /local c][ for c 1 16 1 [ append self/images make img [img-path: image-path img-file: join image-path [c ".jpg"] image: load to-file self/img-file] ] ] ;.... <snip> .... ] James.