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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,edd7ea1b2d7e9a18 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-22 11:01:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed-east.nntpserver.com!nntpserver.com!news-out.visi.com!hermes.visi.com!uunet!ash.uu.net!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Pitfall: freeing access discriminants Date: 22 Feb 2003 14:00:49 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1045940449 2662 199.172.62.241 (22 Feb 2003 19:00:49 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sat, 22 Feb 2003 19:00:49 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:34433 Date: 2003-02-22T14:00:49-05:00 List-Id: porton@ex-code.com (Victor Porton) writes: > In my understanding there may be several standard access pool and the > pool for access Integer and for Integer_Ptr may be different. Isn't it > so? That's correct. If you don't say "for T'Storage_Pool use...", the implementation can use any storage pool it likes. It can put all such types in the same global heap, or it can create a new pool for each type, or anything in between. I think what you want is something like: type Int_Ptr is access Integer; type T(X: Int_Ptr) is new Limited_Controlled... Then you can safely deallocate X using an Unchecked_Deallocation for Int_Ptr. - Bob