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,ed6a891101ff4e06 X-Google-Attributes: gid103376,public From: dewarr@my-dejanews.com Subject: Re: Freeing Pointers to classwide types Date: 1998/09/27 Message-ID: <6ulj29$ne3$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 395311144 References: <1ftmFTC69GA.191@samson.airnet.net> <360b26a1.41575272@SantaClara01.news.InterNex.Net> <6ugeu2$79u$1@nnrp1.dejanews.com> <360c4a70.29707515@SantaClara01.news.InterNex.Net> <6uifpt$e98$1@nnrp1.dejanews.com> <360d1380.165146@SantaClara01.news.InterNex.Net> X-Http-Proxy: 1.0 x3.dejanews.com:80 (Squid/1.1.22) for client 209.73.133.253 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Sun Sep 27 14:45:29 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/2.02 (OS/2; I) Date: 1998-09-27T00:00:00+00:00 List-Id: In article <360d1380.165146@SantaClara01.news.InterNex.Net>, tmoran@bix.com (Tom Moran) wrote: > > the normal coding would be to do a free operation in the > >finalization routine > I'm unable to see a way to code such a finalization routine: > procedure Finalize(X : in out T) is > begin > -- some code that frees the memory of X if it's on the heap > -- and nulls out the (any) pointer to X > end Finalize; This can be done with access discriminants, but the most normal way of doing things is to make the pointer finalizable. There are loads of examples of this around in any text book, or in the GNAT library or anywhere else you look. -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum