Path: utzoo!attcan!uunet!mcsun!ukc!cam-cl!scc
From: scc@cl.cam.ac.uk (Stephen Crawley)
Newsgroups: comp.sw.components
Subject: Re: Real-time Garbage Collection
Message-ID: <921@scaup.cl.cam.ac.uk>
Date: 27 Sep 89 13:21:03 GMT
References: <130200013@p.cs.uiuc.edu> <6599@hubcap.clemson.edu>
Sender: news@cl.cam.ac.uk
Organization: U of Cambridge Comp Lab, UK
Lines: 28

From wtwolfe@hubcap.clemson.edu:
> From johnson@p.cs.uiuc.edu:
>> In fact, I don't believe that managed and unmanaged storage paradigm
>> should coexist in one program.  You should either use components that
>> use automatic garbage collection or components that do not.  While it
>> is possible to link C code to Lisp or Smalltalk, it is always tricky
>> and error prone.
>
> Since Ada components can coexist with no difficulty, this is
> not a true statement in general.

Suppose we garbage collect an object that contains a pointer to a 
non-GC'able object X.  The garbage collector cannot reclaim X and
it cannot tell the ADT for X that the pointer has been blown away.
In general the object X is likely to be lost to a storage leak.  

The only possible escape is if the garbage collection mechanism includes 
some scheme for applying a "destructor" to an object that is about to
be reclaimed by the GC.  I have not come across such a scheme described
in the ADA RM. 

-- Steve