comp.lang.ada
 help / color / mirror / Atom feed
From: Nick Roberts <nickroberts@blueyonder.co.uk>
Subject: Re: Unchecked_Deallocation subtleties
Date: Thu, 10 Apr 2003 12:49:16 +0100
Date: 2003-04-10T12:49:16+01:00	[thread overview]
Message-ID: <oprnewgeaubqmqul@news.cis.dfn.de> (raw)
In-Reply-To: <v993pebn2aja53@corp.supernews.com>

On Wed, 9 Apr 2003 16:23:36 -0500, Randy Brukardt <randy@rrsoftware.com> 
wrote:

> ...
>
> The implementation is clearly wrong.
>
> The only place that the standard ever talks about calling the storage
> pool Deallocate is in 13.11.2(9). That paragraph starts with "Free(X),
> when X is not already equal to null...". So, there is no justification
> for calling Deallocate, or Finalize, or doing anything when X is not
> null.
>
> "no effect" here means just that -- no effect: nothing is called,
> executed, etc. I do agree that that term is not formally defined, so
> there is a bit of wiggle room for implementations, but calling arbitrary
> routines because its convinient seems to be beyond any wiggle room.
> Especially as it is easy to do it correctly.
>
> That said, unless you can get a patch from a vendor (and that usually
> means that you're a favored customer), you probably ought to work around
> it - it does not seem hard to do so.

I'm sorry to vacillate, but I must add here that I completely /agree/ with 
Randy; I now disagree with my own previous post!

I agree that the implementation is /wrong/ to call Deallocate when the 
object is already null. (I was thinking about something a bit different 
when writing my previous post.) To do otherwise not only goes against what 
the RM says, but it also goes against good sense.

Apologies for any confusion!

-- 
Nick Roberts
Jabber: debater@charente.de [ICQ: 159718630]



      reply	other threads:[~2003-04-10 11:49 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-09  9:10 Unchecked_Deallocation subtleties Piotr Zgorecki
2003-04-09  9:46 ` Samuel Tardieu
2003-04-09 12:19   ` Marin David Condic
2003-04-09 12:37     ` Samuel Tardieu
2003-04-10 12:02       ` Marin David Condic
2003-04-09 16:54     ` Warren W. Gay VE3WWG
2003-04-09 20:19       ` Nick Roberts
2003-04-09 21:39         ` Samuel Tardieu
2003-04-10 11:37           ` Nick Roberts
2003-04-10 14:39             ` Robert Spooner
2003-04-10 16:39             ` Warren W. Gay VE3WWG
2003-04-09 19:50 ` Nick Roberts
2003-04-10 15:04   ` Nick Roberts
2003-04-10 16:40     ` chris.danx
2003-04-14 23:42   ` Keith Thompson
2003-04-15  1:54     ` Nick Roberts
2003-04-15 12:00     ` Larry Kilgallen
2003-04-15 12:13       ` Jacob Sparre Andersen
2003-04-19  8:57         ` AG
2003-04-09 21:23 ` Randy Brukardt
2003-04-10 11:49   ` Nick Roberts [this message]
replies disabled

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