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-Thread: 103376,ee06257af909a235 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!attbi_s22.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Finalization of static package variables References: <4640f20b$1@news.upm.es> <1178723724.958486.24820@u30g2000hsc.googlegroups.com> <464244d8$1@news.upm.es> <1178753228.648765.89390@e65g2000hsc.googlegroups.com> <1179324410.556097.234870@u30g2000hsc.googlegroups.com> In-Reply-To: <1179324410.556097.234870@u30g2000hsc.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s22 1179334028 12.201.97.213 (Wed, 16 May 2007 16:47:08 GMT) NNTP-Posting-Date: Wed, 16 May 2007 16:47:08 GMT Organization: AT&T ASP.att.net Date: Wed, 16 May 2007 16:47:08 GMT Xref: g2news1.google.com comp.lang.ada:15813 Date: 2007-05-16T16:47:08+00:00 List-Id: Adam Beneschan wrote: > > So, to go back to a point I briefly mentioned in my previous post: > does Ada need a feature that would allow you to call your own > finalization procedure or something when the environment task is > completing, so that you don't have to do this using trickery? Maybe > something like: > > package Ada.Finalization.Environment is > type Finalization_Proc is access procedure; > procedure At_Environment_Task_Completion (Proc : in > Finalization_Proc); > end Ada.Finalization.Environment; > > Then, the body of the "Environment_Task" implicit task would call the > main subprogram and then call any procedures registered with > At_Environment_Task_Completion, in arbitrary order; you could possibly > add an exception handler to the Environment_Task body to call the > finalization procedures too. > > That would be a simple way to solve this sort of problem without > adding any language syntax. Not for this problem. This was simply a misunderstanding of how to use JEWL; JEWL windows should always be explicitly closed. In the general case, I'd think this indicates a design problem, not a failure of the language. -- Jeff Carter "I like it when the support group complains that they have insufficient data on mean time to repair bugs in Ada software." Robert I. Eachus 91