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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,42fb0a5ae1751a1e,start X-Google-Attributes: gid103376,public From: "Guido Schumacher" Subject: Re: Q Controlled Types Date: 1997/06/13 Message-ID: <5ns30g$9ui@news.Informatik.Uni-Oldenburg.DE>#1/1 X-Deja-AN: 248180380 Organization: C. v. Ossietzky Universitaet Oldenburg - Fachbereich Informatik Newsgroups: comp.lang.ada Date: 1997-06-13T00:00:00+00:00 List-Id: Robert A Duff wrote: >Anonymous wrote: Mark A Biggar wrote: >>On 5 Jun 1997 19:27:11 GMT, "Guido Schumacher" >> wrote: >> >>> Is there a possibility to distinguish two different kinds of situations >>> in which Finalize can be called from within the body of Finalize? >>> In other words, is it possible to treat the finalization of an object differently, >>> depending on the context in which it is performed? > >I'm curious. Why do you want to do this? My intention is to preserve information of a target object in an assignment. The information (containing a protected object) is stored in an object which can be accessed by an access type. A pointer of that access type is a record component of the controlled type. If it were obvious that a call of finalize is not part of an assignment it would be possible to deallocate the object containing the static information. The controlled object and the static object would both have the same lifetime. >>In a word, "No." > >Agreed. > >>Should someone prove me wrong, I'd be interested to learn how to do >>this. > >Not me. It seems that Finalize doesn't know whether it's called from >assignment vs at end-of-procedure. Thank you for the replies. Guido -- Guido Schumacher Carl von Ossietzky Universitaet Oldenburg Postfach 2503 26111 Oldenburg Email: Guido.Schumacher@Informatik.Uni-Oldenburg.de Tel.: +49 441 798 2370 Fax: +49 441 798 2145