comp.lang.ada
 help / color / mirror / Atom feed
From: "Grein, Christoph" <christoph.grein@eurocopter.com>
To: comp.lang.ada@ada.eu.org
Subject: Re: Pitfall: freeing access discriminants
Date: Fri, 14 Feb 2003 07:21:40 +0100 (MET)
Date: 2003-02-14T07:21:40+01:00	[thread overview]
Message-ID: <mailman.13.1045204190.13246.comp.lang.ada@ada.eu.org> (raw)

> >   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?

There are some statements in the AARM that you have to deallocate with an access 
ess type that has the same storage pool as the one the object was allocated 
with. Without specifying that two access types accessing the same type actually 
use the same pool (via specifying the pool of the second access type: "for 
P2'Storage_Pool use P1'Storage_Pools;" - not sure of the syntax), you rely on 
the mercy of the compiler implementers.

You might experience the nasal demons 
effect...



             reply	other threads:[~2003-02-14  6:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-14  6:21 Grein, Christoph [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-02-14  6:02 Pitfall: freeing access discriminants Grein, Christoph
2003-02-13 12:41 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
2003-02-14 21:30         ` Simon Wright
2003-02-14  8:28     ` Victor Porton
2003-02-22 19:00       ` Robert A Duff
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