[plt-scheme] Weak boxes and uncollected values

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

On 7/25/06, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> 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.

Are you trying to tell me mzscheme keeps around a reference to every
fixnum the program ever generates, just in case it might happen to
compute the same number again?  I don't believe you, or I'm seriously
misunderstanding your statement.

-- 
Carl Eastlund


Posted on the users mailing list.