aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/libgnat/a-uncdea.ads
blob: 4b3a1970d57305008191d05bf7186a97652c0313 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
------------------------------------------------------------------------------
--                                                                          --
--                         GNAT COMPILER COMPONENTS                         --
--                                                                          --
--           A D A . U N C H E C K E D _ D E A L L O C A T I O N            --
--                                                                          --
--                                 S p e c                                  --
--                                                                          --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT.  In accordance with the copyright of that document, you can freely --
-- copy and modify this specification,  provided that if you redistribute a --
-- modified version,  any changes that you have made are clearly indicated. --
--                                                                          --
------------------------------------------------------------------------------

--  This package is defined by ARM 13.11.2 to implement unchecked storage
--  deallocation of an object designated by a value of an access type.

generic
   type Object (<>) is limited private;
   type Name is access Object;

procedure Ada.Unchecked_Deallocation (X : in out Name) with
  Depends => (X    => null,  --  X on exit does not depend on its input value
              null => X),    --  X's input value has no effect
  Post => X = null;          --  X's output value is null
--  Deallocate object denoted by X, and set X to null.

pragma Preelaborate (Unchecked_Deallocation);

pragma Import (Intrinsic, Ada.Unchecked_Deallocation);