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: "David Botton" Subject: Re: Access to classwide type Date: 2000/07/24 Message-ID: #1/1 X-Deja-AN: 649987343 References: <8lfuof$ipb$1@nnrp1.deja.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Abuse-Info: Otherwise we will be unable to process your complaint properly X-Complaints-To: support@usenetserver.com Organization: WebUseNet Corp http://www.usenetserver.com - Home of the fastest NNTP servers on the Net. X-MSMail-Priority: Normal NNTP-Posting-Date: Mon, 24 Jul 2000 00:19:41 EDT Newsgroups: comp.lang.ada Date: 2000-07-24T00:00:00+00:00 List-Id: package Pk1 is type T is abstract tagged private; type T_Ptr is access T'Class; private type T is abstract tagged null record; end Pk1; with Ada.Unchecked_Deallocation; with Pk1; use Pk1; procedure Alloc is procedure Free_Object is new Ada.Unchecked_Deallocation (T'Class, T_Ptr); begin null; end Alloc; wrote in message news:8lfuof$ipb$1@nnrp1.deja.com... > I have what may be a really simple question. > > If I have: > > type T is abstract tagged private; > type T_Ptr is access T'Class; > > How do I deallocate the memory for values in an array of T_Ptr's? > > Is it as simple as creating an instantiation of ada.unchecked_conversion > with T'Class and T_Ptr? That seems wrong to me as the various extentions > to T are not known at compile time, but I may be wrong about this. > > Any help would be appreciated. > --- > Jeffrey Blatt > > > Sent via Deja.com http://www.deja.com/ > Before you buy. >