3 with Ada.Unchecked_Deallocation;
4 with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
6 procedure Tagged_Alloc_Free is
8 type Test_Base is tagged null record;
9 type Test_Class_Access is access all Test_Base'Class;
10 type Test_Extension is new Test_Base with record
11 Last_Name : Unbounded_String := Null_Unbounded_String;
14 procedure Free is new Ada.Unchecked_Deallocation
15 (Object => Test_Base'Class,
16 Name => Test_Class_Access);
18 Handle : Test_Class_Access := new Test_Extension;