comp.lang.ada
 help / color / mirror / Atom feed
From: dewarr@my-dejanews.com
Subject: Re: Freeing Pointers to classwide types
Date: 1998/09/27
Date: 1998-09-27T00:00:00+00:00	[thread overview]
Message-ID: <6ulj29$ne3$1@nnrp1.dejanews.com> (raw)
In-Reply-To: 360d1380.165146@SantaClara01.news.InterNex.Net

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




  reply	other threads:[~1998-09-27  0:00 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-09-24  0:00 Freeing Pointers to classwide types joecool
1998-09-25  0:00 ` alan walkington
1998-09-25  0:00 ` Tom Moran
1998-09-25  0:00   ` dewarr
1998-09-25  0:00     ` Tom Moran
1998-09-25  0:00       ` dewarr
1998-09-26  0:00     ` Tom Moran
1998-09-26  0:00       ` dewarr
1998-09-26  0:00         ` Tom Moran
1998-09-27  0:00           ` dewarr [this message]
1998-09-27  0:00             ` Tom Moran
1998-09-28  0:00               ` dewarr
1998-09-28  0:00                 ` Tom Moran
1998-09-28  0:00                   ` dewarr
1998-09-28  0:00                     ` Richard D Riehle
1998-09-28  0:00                       ` Pat Rogers
1998-09-29  0:00                       ` dewarr
1998-09-28  0:00                   ` dewarr
1998-09-28  0:00                     ` Tom Moran
1998-09-28  0:00                       ` Pat Rogers
1998-09-28  0:00                         ` Tom Moran
1998-09-28  0:00                           ` Pat Rogers
1998-09-29  0:00                           ` dewarr
1998-09-29  0:00                             ` Tom Moran
1998-09-30  0:00                               ` Tom Moran
1998-10-01  0:00                                 ` dewar
1998-10-01  0:00                                   ` Tom Moran
1998-10-01  0:00                                     ` Samuel Tardieu
1998-10-01  0:00                                       ` Tom Moran
1998-10-01  0:00                                         ` Tucker Taft
1998-10-01  0:00                                           ` Tom Moran
1998-10-02  0:00                                           ` dewarr
1998-10-02  0:00                                             ` Larry Kilgallen
1998-10-02  0:00                                               ` dewarr
1998-10-02  0:00                                           ` dennison
1998-10-02  0:00                                             ` dewarr
1998-10-01  0:00                                         ` dennison
1998-10-02  0:00                                         ` dewarr
1998-10-09  0:00                                           ` Matthew Heaney
1998-10-09  0:00                                             ` dennison
1998-10-09  0:00                                               ` Matthew Heaney
1998-10-01  0:00                                     ` dewarr
1998-10-01  0:00                                       ` Tom Moran
1998-10-01  0:00                                     ` dewarr
1998-09-28  0:00                       ` Tom Moran
1998-09-28  0:00                         ` Brian Rogoff
1998-10-09  0:00           ` Matthew Heaney
1998-09-25  0:00   ` Bob Fletcher
1998-09-25  0:00     ` Samuel Tardieu
1998-09-25  0:00     ` dennison
1998-10-09  0:00     ` Matthew Heaney
1998-10-12  0:00       ` Mats Weber
1998-10-12  0:00         ` Pat Rogers
1998-10-09  0:00   ` Matthew Heaney
1998-09-26  0:00 ` Simon Wright
1998-10-09  0:00 ` Matthew Heaney
1998-10-09  0:00   ` Niklas Holsti
1998-10-10  0:00     ` Matthew Heaney
1998-10-11  0:00       ` Niklas Holsti
1998-10-11  0:00         ` Matthew Heaney
  -- strict thread matches above, loose matches on Subject: below --
1998-09-25  0:00 bpr5549
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox