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,9d56a9e1aac251b6 X-Google-Attributes: gid103376,public From: Matthew J Heaney Subject: Re: Access to classwide type Date: 2000/07/25 Message-ID: <7rem4ix8wl.fsf@butter.albany.duck.com>#1/1 X-Deja-AN: 650701896 Sender: mheaney@butter.albany.duck.com References: <8lfuof$ipb$1@nnrp1.deja.com> <8li0m5$1i4$1@nnrp1.deja.com> X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 964560266 208.136.9.227 (Tue, 25 Jul 2000 14:24:26 PDT) Organization: EarthLink Inc. -- http://www.EarthLink.net NNTP-Posting-Date: Tue, 25 Jul 2000 14:24:26 PDT Newsgroups: comp.lang.ada Date: 2000-07-25T00:00:00+00:00 List-Id: reason67@my-deja.com writes: > How in the heck does it do that? Does Ada.Unchecked_Deallocation read > the tag and do a `size on the data structure to determine the size of > the memory in heap to release? I am suprised by this. It is more > implicit than I am used to in Ada. More or less, yes. The language mandates that the Ada run-time has to keep track of the specific type being designated by the (pointer-to-class-wide) access object. This means Unchecked_Deallocation is guaranteed to work. It even calls the Finalize operation on controlled objects.