[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Senora GC ?



> > What would be
> > a good example of this, something like:
> > 
> > static Scheme_Object* v = NULL;
> > 
> > ... later ...
> > 
> > v = scheme_make_string("Hello, World");
> > 
> > ... do something ...
> > 
> > Later we reassign v:
> > 
> > v = scheme_make_string("New string.");
> 
> This is a good example. Unless `v' is registered, then the "Hello,
> World" string can disappear during "... do domething ...".
> 

Okay.  Now, what if I want to tell MzScheme that it *may* now
destroy a static variable.  In the above, let's say I want 
"Hello, World" to be protected from garbage collection during
"... do something ...", so I register it with the command.

Now, when I reassign "v" to "New string.", will the old value
v originally pointed to now be collected (since the GC should
see that the original Scheme_Object is no longer referred to),
or must I call some kind of "free"?

Thanks,

-Brent