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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ee06257af909a235 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!proxad.net!news.in2p3.fr!in2p3.fr!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Finalization of static package variables Date: Tue, 15 May 2007 19:36:49 -0500 Organization: Jacob's private Usenet server Message-ID: References: <4640f20b$1@news.upm.es> <1178723724.958486.24820@u30g2000hsc.googlegroups.com> <464244d8$1@news.upm.es> <1178753228.648765.89390@e65g2000hsc.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1179275687 9514 69.95.181.76 (16 May 2007 00:34:47 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 16 May 2007 00:34:47 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Xref: g2news1.google.com comp.lang.ada:15804 Date: 2007-05-15T19:36:49-05:00 List-Id: "Adam Beneschan" wrote in message news:1178753228.648765.89390@e65g2000hsc.googlegroups.com... On May 9, 3:00 pm, Manuel Collado wrote: > Adam Beneschan escribi�: > Well, JEWL uses tasks internally. So, who knows... > > No, I believe that all objects, including static package variables > > *and* including allocated objects that have not yet been deallocated, > > are supposed to be finalized when the environment task completes. > > 10.2(25), 7.6.1(10). > > The fact is that there is a significant difference in behaviour between > variables in the main procedure and static package variables. Example: This sounds awfully familiar to me; it's a problem that we had in Claw. The problem you're having appears to be that the library you arer using (JEWL) does not properly support library-level objects. We had a lot of trouble with this in Claw, in the end we found a trick to determine when the environment task is completing; then we have the main task forcibly close/finalize all open windows. Otherwise, the program would go catatonic, because the tasks would be waiting for the windows to close, but Ada says that the tasks have to end first. Moral: using an ancient library and an ancient compiler means that you'll refind all of the bugs long ago worked out. Use a newer compiler, use a library like Claw oe GWindows or even GtkAda, and you won't have these sorts of issues... Randy.