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,4bd6ca8f7a1eb225 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.0.170 with SMTP id 10mr29292819pbf.2.1322537857624; Mon, 28 Nov 2011 19:37:37 -0800 (PST) MIME-Version: 1.0 Path: lh20ni34442pbb.0!nntp.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx02.iad01.newshosting.com!newshosting.com!news2.euro.net!amsnews11.chello.com!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!jacob-sparre.dk!ada-dk.org!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Class with task destructor Date: Mon, 28 Nov 2011 21:36:06 -0600 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <30604696.94.1322013045135.JavaMail.geo-discussion-forums@yqzz20> <80027d05-2740-4899-b43a-514100ec9bd2@p16g2000yqd.googlegroups.com> <40710291-64ed-46b8-9106-40b7d481effd@b32g2000yqn.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1322537770 8526 69.95.181.76 (29 Nov 2011 03:36:10 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 29 Nov 2011 03:36:10 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news2.google.com comp.lang.ada:14710 Date: 2011-11-28T21:36:06-06:00 List-Id: "Adam Beneschan" wrote in message news:40710291-64ed-46b8-9106-40b7d481effd@b32g2000yqn.googlegroups.com... On Nov 23, 4:15 pm, "Randy Brukardt" wrote: ... >> The task continues to run (always) through a UC. The compiler has to >> ensure >> that works, and if that means not deallocating the object, that would >> work. >> Janus/Ada doesn't work this way, all of the task information is in the >> TCB >> and there is no connection to the enclosing object. > >Except that in the OP's case, there *is* a connection: the task has an >access discriminant that will refer to the enclosing object, and if >the task keeps running, it could use that discriminant. 13.11.2(11-15) covers this. Essentially, either no deallocation is done or an exception is raised somewhere, sometime. I think Janus/Ada uses the third choice, but I'm not sure anymore. In any case, as I said, you can't sensibly call Unchecked_Deallocation until the task is known to have stopped (if it has discriminants). And in any case, the storage for the task probably won't be reclaimed for a long time. Randy. Randy.