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

[REBOL] Re: Delete an Instance of an Object

From: joel:neely:fedex at: 29-Sep-2002 17:02

Hi, Philippe, Can you supply a little more detail? Philippe Oehler wrote:
> How Can I delete an instance of an object ? >
In the simple case of something like myword: make object! [...] you can simply evaluate myword: none or any other expression that destroys the reference to the object. However AFAIK the object isn't really eligible for garbage collection until all references have gone away. If you other references, then it's not yet garbage. For example, foo: make object! [...] gorp: make block! 10 loop 10 [ insert tail gorp make foo [...] ] myword: first gorp creates a situation in which evaluating either (one) of myword: none or gorp: none still leaves another reference to the first object created from FOO. Does that address your question, or am I missing something? -jn- -- ; Joel Neely joeldotneelyatfedexdotcom REBOL [] do [ do func [s] [ foreach [a b] s [prin b] ] sort/skip do function [s] [t] [ t: "" foreach [a b] s [repend t [b a]] t ] { | e s m!zauafBpcvekexEohthjJakwLrngohOqrlryRnsctdtiub} 2 ]