Newsgroups: alt.lang.design,comp.lang.c,comp.lang.c++,comp.lang.lisp,zer.z-netz.sprachen.algorithmen
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!swrinde!sgiblab!uhog.mit.edu!rutgers!njitgw.njit.edu!hertz.njit.edu!kxn3796
From: kxn3796@hertz.njit.edu (Ken Nakata)
Subject: Re: Reference Counting (was Re: Searching Method for Incremental Garbage Collection)
Message-ID: <1994Nov22.184647.8864@njitgw.njit.edu>
Sender: news@njit.edu
Nntp-Posting-Host: hertz.njit.edu
Organization: New Jersey Institute of Technology, Newark, New Jersey
References: <3ai2ol$3ua@gate.fzi.de> <AST.178.785265972@postman.hsn.no> <CzKAnH.D3@rheged.dircon.co.uk> <CzoCo6.FEB@cunews.carleton.ca>
Date: Tue, 22 Nov 1994 18:46:47 GMT
Lines: 31
Xref: glinda.oz.cs.cmu.edu comp.lang.c:117517 comp.lang.c++:99932 comp.lang.lisp:15754

In article <CzoCo6.FEB@cunews.carleton.ca>,
David F. Skoll <dfs@doe.carleton.ca> wrote:
>In article <CzKAnH.D3@rheged.dircon.co.uk>, Simon Brooke
>(simon@rheged.dircon.co.uk) wrote:
>> After all, circular data structures hit most (all?) garbage collecting
>> strategies.
>
>No, they don't.  A simple mark-sweep GC will properly handle circular
>structures.

Right, he doesn't seem to understand.

[.....]
>> Furthermore, programs which habitually create circular structures and
>> then forget about them are (in my expreience) rare.
>
>How about a binary tree where for convenience each node stores a pointer
>to its parent as well as pointers to its children?  Pretty common.
>How about doubly-linked lists?  Pretty common.

It is not clear what he meant by "habitually create" "and then forget"
about circular structure, but IMO, your examples do not "forget" about
the circular structure, because usually you enforce some sort of
*partial order* on the graph nodes (e.g. "Before a list node can be
deleted, all its succeeding nodes must be deleted," or "before a tree
node can be deleted, all its descendant nodes must be deleted," etc).
A practical example would be (again) UNIX file system structure.

Ken
-- 
Music is the best                                         -- Frank Zappa
