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

RE: Senora GC ?



>  ... as well as the address of any static variable containing
>    GCable pointers.

Does this mean a static variable pointing to a Scheme_Object that
you wish the GC to destroy for you at some point?  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.");

And therefore the original "v" is not collected, correct?  But
if we register v, it *would* have been collected, without an
explicit call to scheme_free or similar?

On a similar thread:  What if I have some Scheme_Object's in
my program that I wish to retain control of (in terms of when
or if they are collected).  If I don't register them, the GC
should never touch them, right?  But Boehm might?

So in those cases do I need to use the "uncollectable" malloc
version?  And what about if I am creating an object using an
existing function like "scheme_make_string".  How can I protect
them from being collected?  I might want them to persist beyond
a single "scheme_eval"...

Thanks,

-Brent