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=0.6 required=5.0 tests=BAYES_20,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,847313ba8810390,start X-Google-Attributes: gid103376,public From: paulb@cs.uq.edu.au (Paul Burnim) Subject: Unchecked_Deallocation with tagged types Date: 1996/11/22 Message-ID: <572uhr$bqf@miso.cs.uq.edu.au>#1/1 X-Deja-AN: 197962472 organization: Computer Science Dept, University of Queensland newsgroups: comp.lang.ada Date: 1996-11-22T00:00:00+00:00 List-Id: Hi, I'm using my own garbage collection routine for some dynamically allocated objects, e.g. type anytype; type anytype_ptr is access all anytype'Class; type anytype is tagged record ..... end record; type r_integer is new anytype with record val : integer; end record; my question is, if I create an unchecked_deallocation for the type anytype, will it correctly deallocate an object of the type r_integer, or do I need to explicitly call an unchecked_deallocation for r_integer. e.g. procedure Free is new Unchecked_Deallocation (anytype, anytype_ptr); a : anytype_ptr begin a := new r_integer'(val => 1, ...) Free(a); end; Thanks Paul. -- _-_|\ Paul Burnim EMAIL: paulb@cs.uq.edu.au / * Computer Science Department RM 614 - PH:3365 1181 - FAX:3365 1999 \_.-._/ The University of Queensland http://www.hotdiscs.com/ v Australia 4072 Home of the Kylie & SAW Mailing Lists