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,aa968038a51ee866 X-Google-Attributes: gid103376,public From: eachus@spectre.mitre.org (Robert I. Eachus) Subject: Re: Q: Ada.Unchecked_Deallocation Date: 1996/07/16 Message-ID: #1/1 X-Deja-AN: 169297675 references: <31E5D4D1.11DB36E1@jinx.sckans.edu> organization: The Mitre Corp., Bedford, MA. newsgroups: comp.lang.ada Date: 1996-07-16T00:00:00+00:00 List-Id: In article dewar@cs.nyu.edu (Robert Dewar) writes: > We talked at one point with Tuck about a pragma that would be applied to > a type something like > Finalization_Is_Used_Only_For_Freeing_Storage (type); > (well we need a better name :-) > the effect would be to simply ignore finalize calls at the outer level, or, > in the case of a GC Ada 95, to ignore all finalize calls for the type. > Thoughts? Yep. The lack of a good name means that you are trying to implement the wrong pragma. Add a pragma Free or a pragma Collect to GNAT, where the semantics are to apply respectively Unchecked_Deallocation or checked deallocation to all the access values in the record during finalization. (You might even want a third pragma that is never called by assignment, but that is a detail, since Collect should be functionally identical.) Of course an explicit overriding of Finalize for a derived type should supercede the pragma for that type and its children. -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...