comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <Stephe.Leake@nasa.gov>
Subject: Re: Boehm-Demers-Weiser conservative garbage collector and GNAT
Date: 23 Jun 2003 17:11:18 -0400
Date: 2003-06-23T21:11:43+00:00	[thread overview]
Message-ID: <u4r2gzeh5.fsf@nasa.gov> (raw)
In-Reply-To: 874r2js14x.fsf@deneb.enyo.de

Florian Weimer <fw@deneb.enyo.de> writes:

> Stephen Leake <Stephe.Leake@nasa.gov> writes:
> 
> > I wrote a container library that does all the memory management I
> > need.
> 
> How do you prevent client code from keeping references to objects in
> the container at the point of its finalization?  

My library does allow this. It is not a bullet-proof, "assume the
client is an idiot" library.

See the discussion on Grace lists for some reasons why.

however, I normally code my apps so the container is always active;
it's created when the app starts, and is one of the last things
finalized when the app is shutting down.

> Is erroneous execution a possibility?

Yes, in the sense that Ada + my library allows it.

> I don't think memory leaks are the most severe problem, dangling
> references are.

Yes. 

However, note that I said "all the memory management I need", not "all
the memory protection a novice needs". Some small amount of discipline
is expected on the part of the client; the goal is to get a good
balance between container efficiency and protection against bugs.

Now someone will say "C struck a better balance"; more power to them
:).

The issue of whether garbage collection is a good thing for novice
programmers is an interesting one. My initial take would still be "no
- don't let them get used to the crutch". But I'm willing to be
convinced.

-- 
-- Stephe



  reply	other threads:[~2003-06-23 21:11 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-16 16:45 Boehm-Demers-Weiser conservative garbage collector and GNAT Martin Krischik
2003-06-17  9:04 ` Ludovic Brenta
2003-06-17  9:47   ` Preben Randhol
2003-06-17 10:19     ` Ludovic Brenta
2003-06-17 10:35       ` Preben Randhol
2003-06-17 11:53         ` Ludovic Brenta
     [not found]           ` <slrnbeu1ht.big.randhol+abuse@kiuk0152.chembio.ntnu.no>
2003-06-17 12:55             ` Larry Kilgallen
2003-06-17 13:00               ` Preben Randhol
2003-06-17 13:40                 ` Ludovic Brenta
2003-06-17 13:43                   ` Preben Randhol
2003-06-17 14:59                   ` Larry Kilgallen
2003-06-17 15:32                     ` Ludovic Brenta
2003-06-17 16:52                       ` Stephen Leake
2003-06-17 18:43                         ` Marin David Condic
2003-06-17 19:13                           ` Stephen Leake
2003-06-17 20:52                             ` Marin David Condic
2003-06-18  7:37                               ` Preben Randhol
2003-06-18 11:30                                 ` Marin David Condic
2003-06-21 19:04                         ` Florian Weimer
2003-06-23 21:11                           ` Stephen Leake [this message]
2003-06-24  8:47                             ` Vinzent Hoefler
2003-06-17 18:41                     ` Marin David Condic
2003-06-17 15:54                   ` Larry Kilgallen
     [not found]                   ` <QdZxXhgRp7Ti@eisner.encompasserve.orgOrganization: LJK Software <8nXPHPFBnkS2@eisner.encompasserve.org>
2003-06-17 16:08                     ` Ludovic Brenta
2003-06-17 17:37                   ` Larry Kilgallen
2003-06-17 19:22                   ` Larry Kilgallen
     [not found]                   ` <QdZxXhgRp7Ti@eisner.encompasserve.orgOrganization: LJK Software <vDKsCwFxWhWJ@eisner.encompasserve.org>
2003-06-17 20:57                     ` Marin David Condic
2003-06-18  5:57                     ` Robert I. Eachus
2003-06-18 13:36                     ` Jean-Pierre Rosen
2003-06-17 15:48         ` Martin Krischik
2003-06-17 15:46   ` Martin Krischik
2003-06-21 18:51 ` Florian Weimer
2003-06-22 17:32   ` Martin Krischik
2003-06-29 15:17     ` Florian Weimer
2003-06-30 18:58       ` Martin Krischik
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox