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, MSGID_RANDY 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: reason67@my-deja.com Subject: Re: Access to classwide type Date: 2000/07/24 Message-ID: <8lij0o$fqa$1@nnrp1.deja.com>#1/1 X-Deja-AN: 650323403 References: <8lfuof$ipb$1@nnrp1.deja.com> <8li0m5$1i4$1@nnrp1.deja.com> <8GRaL$AJ9PHa@eisner.decus.org> X-Http-Proxy: NetCache@www-blv-proxy2.boeing.com: Version NetApp Release 3.4D6: Mon Aug 23 16:40:19 PDT 1999-Solaris, 1.0 x70.deja.com:80 (Squid/1.1.22) for client 12.13.226.12 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Mon Jul 24 23:20:59 2000 GMT X-MyDeja-Info: XMYDJUIDreason67 Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.5 [en]C-CCK-MCD Boeing Kit (Win95; I) Date: 2000-07-24T00:00:00+00:00 List-Id: In article <8GRaL$AJ9PHa@eisner.decus.org>, > In article <8li0m5$1i4$1@nnrp1.deja.com>, 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. > If it works for access to a variant type, why shouldn't it work here ? > Big difference there. A variant record is defined at compile time. The number of children on a tagged type can not be known until link time. The machine code for the unchecked deallocation has to be static at compile time. Like I said, I am betting it reads the 'size inside the unchecked deallocation at run-time and deleting the size it determines. --- Jeffrey Sent via Deja.com http://www.deja.com/ Before you buy.