Path: utzoo!attcan!utgpu!watmath!iuvax!rutgers!cbmvax!jesup
From: jesup@cbmvax.UUCP (Randell Jesup)
Newsgroups: comp.sw.components
Subject: Re:  Re: Garbage Collection & ADTs
Message-ID: <8012@cbmvax.UUCP>
Date: 27 Sep 89 01:29:39 GMT
References: <911@scaup.cl.cam.ac.uk> <6589@hubcap.clemson.edu> <2079@hydra.gatech.EDU>
Reply-To: jesup@cbmvax.UUCP (Randell Jesup)
Organization: Commodore Technology, West Chester, PA
Lines: 27

In article <2079@hydra.gatech.EDU> tynor@prism.gatech.EDU (Steve Tynor) writes:
>In article <6589@hubcap.clemson.edu>
>>From scc@cl.cam.ac.uk (Stephen Crawley):
>>> Here are some problems where programmer-controlled storage management 
>>> would be very difficult or impossible.
>>> 
>>>   Interactive editting of cyclic graph data structures.  You have a 
>>>   heterogeneous cyclic graph data structure and the editor must be able
>>>   to make arbitrary sequences of changes to the data structure.  How
>>>   do you detect that a subgraph has become detached?   
...
>But what if _in_this_case_, a detached subgraph is garbage and should be
>deallocated? G.C. surely simplifies the program and would enhance readability.
>If you can easily detect when to deallocate - more power to you. But, it's 
>not always easy.

	But GC is unlikely to reclaim that storage.  Yes, the graph no longer
has pointers to the disconnected subgraph.  However, the subgraph may be
circular (you said it was cyclic), so all the nodes of the subgraph may still
have references to them.  Can current GC systems recognize such a loop and
remove it in it's entirety?  How complex can such a loop be and still be
recognized?

-- 
Randell Jesup, Keeper of AmigaDos, Commodore Engineering.
{uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com  BIX: rjesup  
Common phrase heard at Amiga Devcon '89: "It's in there!"