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,3ccb707f4c91a5f2 X-Google-Attributes: gid103376,public From: mheaney@ni.net (Matthew Heaney) Subject: Why no Free? Date: 1996/10/17 Message-ID: #1/1 X-Deja-AN: 190174654 references: <325BC3B3.41C6@hso.link.com> <325D7F9B.2A8B@gte.net> <325FF8D0.6660@io.com> content-type: text/plain; charset=ISO-8859-1 organization: Estormza Software mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-10-17T00:00:00+00:00 List-Id: In article , dewar@merv.cs.nyu.edu (Robert Dewar) wrote: >To get a feel for the orginal intent in Ada (which was that typical >implementations would have GC), note that although NEW is clearly a >first class citizen in Ada, and is introduced early on in the RM, >the corresponding FREE operation is buried in chapter 13 and given >a disparaging name (unchecked_deallocation). Just as the thought was >that most programs would not need to use unchecked conversion, the >thought was that most programs would not need to use unchecked >deallocatoin, because GC would be there. You know, I've always wondered about this. It seemed rather strange that the programmer would have to jump through all these hoops to deallocate storage. If I can do this The_Node : Node_Access := new Node; then why shouldn't I be able to do this Free (The_Node); without instantiating Unchecked_Deallocation? This omission in the language seems curious given that in Ada 95, the designers gave us explicit control of the storage pool, but no simple way to reclaim storage. (Maybe that's stretching things a bit; it's only an instantiation...) To the designers of Ada 95: Why didn't you throw in a Free? Had this been discussed? Is it a candidate for inclusion in Ada 0X? -------------------------------------------------------------------- Matthew Heaney Software Development Consultant mheaney@ni.net (818) 985-1271