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,afda15cf2a9aa1ca,start X-Google-Attributes: gid103376,public From: simon.j.wright@gecm.com (Simon Wright) Subject: Deallocation via class-wide pointer Date: 1996/11/22 Message-ID: #1/1 X-Deja-AN: 198099692 sender: sjw@luthien.frlngtn.gmcs.gecm.com organization: Ferranti Naval Systems, GEC-Marconi S3I Combat Systems Division newsgroups: comp.lang.ada Date: 1996-11-22T00:00:00+00:00 List-Id: I have a type T and a class-wide pointer: type T is tagged with null record; type TP is access T'Class; I have a queue of T's (and, of course, types extended from T) to process. The individual objects are allocated dynamically and put into some Queue package, which manages TP's. What I want to do is to pop the objects off the queue, process them (via some appropriate dispatching operation) and then deallocate the memory. For the life of me I can't see how to get to call type TPP is access T; procedure Free is new Unchecked_Deallocation (T, TPP); This must be a common problem, I guess I'm just looking at it wrong; any thoughts? -- Simon Wright (G-net) +842-1778 Ferranti Naval Systems (voice) +44(0)1705-701778 GEC-Marconi S3I Combat Systems Division (fax) +44(0)1705-701800