[plt-scheme] Weak boxes and uncollected values

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Jul 25 15:21:09 EDT 2006

At Tue, 25 Jul 2006 15:05:51 -0400, "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.

There are still references somewhere. In particular, if you read `#t',
you get back an object that is `eq?' to the key in the hash table.
That's true for `7', too, if you use 7 as a key.

Since you can still reach the key, the mapping stays in the hash table.

> 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
> program?



Posted on the users mailing list.