comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Pitfall: freeing access discriminants
Date: Fri, 14 Feb 2003 04:16:21 GMT
Date: 2003-02-14T04:16:21+00:00	[thread overview]
Message-ID: <p4_2a.106748$Ec4.90220@rwcrnsc52.ops.asp.att.net> (raw)
In-Reply-To: x7v4r77ubhs.fsf@smaug.pushface.org

> > > type T(D: access Integer)
> > >   type Integer_Ptr is access all Integer;
> > should both refer to the same storage pool.
>
> I don't see how you can be sure that D.all is allocated from the same
> pool as 'access all Integer'? (a bit odd anyway, if you say 'access
> *all* ' you imply that blind deallocation is iffy).
  The "all" is indeed distracting here, but the original posting showed
that the sole possible variable of the type was a copy of the
discriminant, so Free is OK.
>   type Integer_Ptr is access all Integer;
>...
>   P: Integer_Ptr := Integer_Ptr (Object.D);
According to Cohen 2nd ed p 361, Integer_Ptr cannot be a pool-specific
access type.  And how would you make the anonymous access type
"D: access Integer" allocate from other than the standard pool?



  reply	other threads:[~2003-02-14  4:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-13 12:41 Pitfall: freeing access discriminants Grein, Christoph
2003-02-13 13:38 ` Victor Porton
2003-02-13 20:49   ` tmoran
2003-02-13 21:17     ` Simon Wright
2003-02-14  4:16       ` tmoran [this message]
2003-02-14 21:30         ` Simon Wright
2003-02-14  8:28     ` Victor Porton
2003-02-22 19:00       ` Robert A Duff
  -- strict thread matches above, loose matches on Subject: below --
2003-02-14  6:21 Grein, Christoph
2003-02-14  6:02 Grein, Christoph
2003-02-13 10:04 Victor Porton
2003-02-13 12:07 ` Victor Porton
2003-02-13 13:42   ` Preben Randhol
2003-02-13 17:40 ` Stephen Leake
2003-02-13 19:24   ` Victor Porton
replies disabled

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