Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!cam-news-feed3.bbnplanet.com!news.bbnplanet.com!cam-news-hub1.bbnplanet.com!news.tufts.edu!cam-news-feed5.bbnplanet.com!WWW1!not-for-mail
From: Paul Vienneau <pviennea@foxboro.com>
Subject: [VW] WeakDictionary and become
Message-ID: <32F773AA.6159@foxboro.com>
Date: Tue, 04 Feb 1997 12:36:42 -0500
Reply-To: pviennea@foxboro.com
Organization: The Foxboro Company
X-Mailer: Mozilla 3.01 (WinNT; I)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 22

Lets say we have 3 objects (A, B, and C).  A refers to B via an
instance variable, and B refers to C via and instance variable.
Also, lets assume I've anchored A somehwere through a strong reference.
Now lets store A, B and C in a WeakDictionary.

If we inspect the dictionary we see three entries for A, B, and C.  
Everything is great so far.  Now lets do the following

	B become: D

At this point I have assumed the following:

	A now references D.
	Both B and C are garbage collected (probably incorrect assumption).

However, if I inspect the WeakDictionary again, I see A, D, and C.

My question is, why didn't C get removed from the WeakDictionary? 
_____________________________________________________
Paul Vienneau		E-Mail: pviennea@foxboro.com
Software Engineer	Phone:	(508) 549-2052
The Foxboro Company	Fax:	(508) 549-6788

