comp.lang.ada
 help / color / mirror / Atom feed
From: jsa@alexandria (Jon S Anthony)
Subject: Re: Cumbersome Polymorphism
Date: 1997/01/28
Date: 1997-01-28T00:00:00+00:00	[thread overview]
Message-ID: <JSA.97Jan28164907@alexandria> (raw)
In-Reply-To: 32ECF2A3.6371@watson.ibm.com


In article <32ECF2A3.6371@watson.ibm.com> "Norman H. Cohen" <ncohen@watson.ibm.com> writes:

> Richard Irvine wrote:
> > The above package does not free the storage which is allocated
> > in the Store operation.
> > In this case, I could simply introduce an explicit deallocation
> > in the Store operation, before allocating new storage.
> 
> That is precisely the right approach:
>
>[...example...] 

This, of course, only works if the object is not referenced by other
such instances of the access type.  That issue is probably at the root
of Richard's concern.


> > Of course, Ada provides a mechanism for automating deallocation,
> > using controlled types, so a better solution would make use of this:
> 
> The use of controlled types is not warranted in this situation.

The problem is, it is not of any particularly good use in the more
general case either (the one where there are multiple refs).  It's the
same old story.  You need GC.  Or better yet, pool specific (type
specific) GC variants.

/Jon
-- 
Jon Anthony
Organon Motives, Inc.
Belmont, MA 02178
617.484.3383
jsa@organon.com





  parent reply	other threads:[~1997-01-28  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-01-23  0:00 Cumbersome Polymorphism Richard Irvine
     [not found] ` <5c9put$48t@hetre.wanadoo.fr>
1997-01-25  0:00   ` James O'Connor
1997-01-25  0:00   ` Robert A Duff
1997-01-25  0:00     ` James O'Connor
1997-01-26  0:00       ` Brian Rogoff
1997-01-26  0:00       ` Robert Dewar
1997-01-27  0:00   ` Jon S Anthony
1997-01-29  0:00     ` Robert Dewar
1997-01-27  0:00 ` Norman H. Cohen
1997-01-28  0:00   ` Richard Irvine
1997-01-28  0:00   ` Jon S Anthony [this message]
1997-01-28  0:00   ` Dave Gibson
replies disabled

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