[plt-scheme] Weak boxes and uncollected values

From: Carl Eastlund (cce at ccs.neu.edu)
Date: Tue Jul 25 15:05:51 EDT 2006

On 7/25/06, Eli Barzilay <eli at barzilay.org> wrote:
> On Jul 25, Carl Eastlund wrote:
> > Certain values, such as #t and fixnum integers, don't "vanish" from
> > weak boxes after garbage collection, even when there don't seem to be
> > any outside references.
> >
> > An example interaction with mzscheme:
> >
> >
> > The symbol and list are collected; the fixnum and boolean are not.  Is
> > this the intended behavior?  Is there a way to identify these values
> > beforehand, so this behavior can be anticipated?
> These are all unboxed values -- there's nothing that can be collected
> since there is no `6' object.  I think that `#t' and `#f' are objects,
> but they're always marked for no GCing.

I guess it seems arbitrary to me whether the weak box is set to #f or
not for unboxed values.  Regardless of the implementation reasons,
though, it would be convenient for me to have an "uncollectable?"
predicate of some sort.  Is there a way to determine this inside a

Carl Eastlund

Posted on the users mailing list.