comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: little precision about anonymous access types
Date: Tue, 15 May 2018 16:48:49 -0500
Date: 2018-05-15T16:48:49-05:00	[thread overview]
Message-ID: <pdfkk1$pfj$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: 6c1e643d-b826-4b8b-b61c-13c56428ed23@googlegroups.com


"Mehdi Saada" <00120260a@gmail.com> wrote in message 
news:6c1e643d-b826-4b8b-b61c-13c56428ed23@googlegroups.com...
> I should ask this in another way: what strategy do you use with 
> user-defined
>storage pools ? I can guess that since the user doesn't have as much
>"metalinguistic" on types and objects as the compiler, there's a limit to 
>how
>much automatic and complex one might for instance,
>build a default storage pool for anonymous access objects.

Allocate/deallocate with a named access type. As you noted, it is impossible 
to deallocate individual objects with anonymous access types.

Note there is an alternative (not recommended by me): use a storage subpool, 
assign the pool to all anonymous access types using pragma 
Default_Storage_Pool, allocate objects from appropriate subpools, and 
deallocate the objects using Unchecked_Deallocate_Subpool when no longer 
needed.

Or you can just avoid using anonymous access types everywhere and forget (as 
much as possible) that they exist. :-)

                            Randy.





  reply	other threads:[~2018-05-15 21:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-19  0:37 little precision about anonymous access types Mehdi Saada
2018-03-19  1:08 ` Mehdi Saada
2018-03-19  1:18 ` Mehdi Saada
2018-03-19 14:51   ` AdaMagica
2018-03-19 22:40 ` Randy Brukardt
2018-03-20 17:49   ` G. B.
2018-03-20 23:56     ` Mehdi Saada
2018-03-21 22:46       ` Randy Brukardt
2018-05-15  0:20         ` Mehdi Saada
2018-05-15  0:28           ` Mehdi Saada
2018-05-15 21:48             ` Randy Brukardt [this message]
2018-05-16  8:14               ` Mehdi Saada
2018-05-16  8:23                 ` Mehdi Saada
2018-05-17 21:20                   ` Randy Brukardt
2018-05-17 21:17                 ` Randy Brukardt
2018-05-17 21:36                   ` J-P. Rosen
2018-05-18  7:44                   ` Dmitry A. Kazakov
2018-05-15 21:44           ` Randy Brukardt
replies disabled

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