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,31f4d595a05ede7d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Abnormal objects - how they can become normal again? Date: 22 Dec 2005 10:57:36 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <43AA84FD.7050601@mailinator.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1135267057 20313 192.74.137.71 (22 Dec 2005 15:57:36 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Thu, 22 Dec 2005 15:57:36 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:6963 Date: 2005-12-22T10:57:36-05:00 List-Id: "Alex R. Mosteo" writes: > Robert A Duff wrote: > > (snip) > > Another way to deal with abnormal (possibly controlled) objects is to > > add a level of indirection. I believe you can Unchecked_Deallocate an > > abnormal object (not sure). Assignment of access values does not > > involve finalization. So when you have a possibly-abnormal object, you > > could simply throw it away and create a new one. > > I guess you can indeed free abnormal controlled objects, but this will > trigger finalization, and I think the OP wanted to avoid this (as this > happens too when overwriting the abnormal object during asignation). Good point. So I guess the answer is, "never allow controlled objects to become abnormal (if you wish to use them ever again)". And as I said, abort deferral can help you program this. It's not easy. - Bob