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!ix.netcom.com!netcom.com!milod
From: milod@netcom.com (John DiCamillo)
Subject: Re: Reference Counting (was Re: Searching Method for Incremental Garbage Collection)
Message-ID: <milodCzov86.LyD@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
References: <CzHCvp.9rM@rheged.dircon.co.uk> <TFB.94Nov21091959@burns.cogsci.ed.ac.uk> <1994Nov21.181455.13457@isis.muc.de> <CzoE9n.3oM@research.att.com> <3atajl$6sh@gateway.wiltel.com>
Date: Tue, 22 Nov 1994 21:48:06 GMT
Lines: 35
Xref: glinda.oz.cs.cmu.edu comp.lang.c:117526 comp.lang.c++:99948 comp.lang.lisp:15762

ichudov@wiltel.com (Igor Chudov) writes:

>Andrew Koenig (ark@research.att.com) wrote:
>: In article <1994Nov21.181455.13457@isis.muc.de> Mike.Chapman@muc.de (Mike Chapman) writes:

>: > Almost any non trivial structure in the real world, 
>: > if you are actually going to do anything with it,
>: > needs back pointers (simple example - doubly linked lists) 
>: > or pointers to parents (simple example - almost any tree structure)
>: > or whatever.

>: Sure, but such pointers do not prevent reference counting from working.

>Can you give us a clue how you can make reference counting working with
>circular references.

Well, one obvious solution is not to ref-count
the back pointers.  This is pretty easy to do,
since (in C++) you have to explicitly request
ref-counting with a smart pointer or equivalent.

Truly circular structures (e.g. rings) are not
subject to this "solution".

>Could you also give us some kind of estimate about 
>efficiency. How many operations will this algorithm do each time some pointer
>changes? 

Sorry, haven't got a clue.

-- 
    ciao,
    milo
================================================================
    John DiCamillo                        Pinin' for the fjords?
    milod@netcom.com                  What kind of talk is that?
