Ada Reference Manual (Ada 2022 Draft 34)Legal Information
Contents   Index   References   Search   Previous   Next 

13.11.5 Subpool Reclamation

1/3
A subpool may be explicitly deallocated using Unchecked_Deallocate_Subpool.

Static Semantics

2/3
The following language-defined library procedure exists:
3/5
with System.Storage_Pools.Subpools;
procedure Ada.Unchecked_Deallocate_Subpool
   (Subpool : in out System.Storage_Pools.Subpools.Subpool_Handle)
   with Global => in out all;
4/3
If Subpool is null, a call on Unchecked_Deallocate_Subpool has no effect. Otherwise, the subpool is finalized, and Subpool is set to null.
5/5
Finalization of a subpool has the following effects in the given order:
6/5
This paragraph was deleted.
7/3
1.
Any of the objects allocated from the subpool that still exist are finalized in an arbitrary order;
7.1/4
 2.
All of the objects allocated from the subpool cease to exist;
8/3
3.
The following dispatching call is then made: 
9/3
   Deallocate_Subpool(Pool_of_Subpool(Subpool).all, Subpool);
9.1/5
 4.
The subpool ceases to belong to any pool.
10/3
Finalization of a Root_Storage_Pool_With_Subpools object finalizes all subpools that belong to that pool that have not yet been finalized.

Contents   Index   References   Search   Previous   Next 
Ada-Europe Ada 2005 and 2012 Editions sponsored in part by Ada-Europe