From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,80e74153f40106ab X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-04 14:36:56 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!wn11feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!sccrnsc04.POSTED!not-for-mail Message-ID: <3F57B071.5030206@attbi.com> From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Weird controlled behavior - Gnat 3.15p NT References: <5d6fdb61.0309040725.3403aa29@posting.google.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.34.139.183 X-Complaints-To: abuse@comcast.net X-Trace: sccrnsc04 1062711415 24.34.139.183 (Thu, 04 Sep 2003 21:36:55 GMT) NNTP-Posting-Date: Thu, 04 Sep 2003 21:36:55 GMT Organization: Comcast Online Date: Thu, 04 Sep 2003 21:36:55 GMT Xref: archiver1.google.com comp.lang.ada:42154 Date: 2003-09-04T21:36:55+00:00 List-Id: Jano wrote: > Now, I would assume that no Finalization could happen without a > corresponding Initialization, so is this normal? Is something wrong in > that read way? No object can be finalized that has not been initialized (or created as part of an assignment with adjust), but there are a number of situations where even a limited object may be finalized several times. I won't go into the gory details, I think they are all in the Ada 95 Rationale. But you should always either design things so that multiple finalization is harmless, or you check in the finalization operation whether the object has already been finalized. For example if your Finalize procedure contains a call to Unchecked_Deallocation for an access value in the object, be sure to pass the value directly, not a copy, so it gets set to null. -- Robert I. Eachus "As far as I'm concerned, war always means failure." -- Jacques Chirac, President of France "As far as France is concerned, you're right." -- Rush Limbaugh