Newsgroups: alt.lang.design,comp.lang.c,comp.lang.c++,comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!pipex!uunet!psinntp!webprod.lehman.com!lehman2.lehman.com!lehman.com!relay.lehman.com!news
From: rfb@lehman.com (Rick Busdiecker)
Subject: Re: Reference Counting (was Re: Searching Method for Incremental Garbage Collection)
In-Reply-To: beckwb@ois.com's message of 28 Nov 1994 20:38:25 -0500
To: beckwb@ois.com (R. William Beckwith)
Message-ID: <RFB.94Nov30153621@cfdevx1.lehman.com>
Followup-To: alt.lang.design,comp.lang.c,comp.lang.c++,comp.lang.lisp
Lines: 34
Sender: news@lehman.com (News)
Nntp-Posting-Host: cfdevx1
X-Pgp-Version: 2.6
Organization: Lehman Brothers, Inc.
X-Pgp-Signed: iQCVAgUBLtziPpNR+/jb2ZlNAQHIkgP6AsC7HfsHWdm8of2voYFB1WmwMxyJDAP1
	      PZnhddRm0iodYn8fBjh3ZFdYbHvny3jwtXgvZPhJ/KKmg9rkEBliaVZS3JajAe/y
	      IdB5RkUIgBzBvCLZ2hhtflu4inucThg40DzQ2SQjT0VRP4vhOamqMpDuMfqaqMAW
	      0EBwpQZpowc=
	      =Ra01
References: <CzHCvp.9rM@rheged.dircon.co.uk> <TFB.94Nov21091959@burns.cogsci.ed.ac.uk>
	<RFB.94Nov27213114@cfdevx1.lehman.com> <3be0mh$1p7@gamma.ois.com>
Date: Wed, 30 Nov 1994 20:36:21 GMT
Xref: glinda.oz.cs.cmu.edu comp.lang.c:118579 comp.lang.c++:101104 comp.lang.lisp:15876

In article <3be0mh$1p7@gamma.ois.com> beckwb@ois.com (R. William Beckwith) writes:

   Rick Busdiecker (rfb@lehman.com) wrote:
   : In article <3b9gsg$hv8@nntp.crl.com> Richard Berman <sts@crl.com> writes:

   : The point is that reference counting does not solve it.  You have to
   : add some mechanism that is not reference counting

   RCing can work for circular data structures.

   You must define `weak' references.

Yes, this is one example of the kind of mechanism to which I was
referring.  I probably should have said something like ``automated
reference counting'' since this work around is still RC even though
you have to hold its hand.

Weak references are one of the less attractive work arounds for the
circular data structure problem IMO.  They require that you explicitly
interact with the collector.

Classic RC implemented as so-called ``smart pointers'' combined with a
transparent backup mechanism (say Boehm's conservative collector)
strikes me as considerably safer.

Of course, since this `backup' mechanism probably has performance
charactistics superior to RC, there's no real point in bothering with
RC.

--
Rick Busdiecker <rfb@lehman.com>      Please do not send electronic junk mail!
  Lehman Brothers Inc.
  3 World Financial Center  "The more laws and order are made prominent, the
  New York, NY  10285-1100   more thieves and robbers there will be." --Lao Tzu
