4 with Ada
.Unchecked_Deallocation
;
10 type Pattern
is abstract tagged null record;
12 type Pattern_Access
is access Pattern
'Class;
14 procedure Free
is new Ada
.Unchecked_Deallocation
15 (Pattern
'Class, Pattern_Access
);
17 type Action
is abstract tagged null record;
19 type Action_Access
is access Action
'Class;
21 procedure Free
is new Ada
.Unchecked_Deallocation
22 (Action
'Class, Action_Access
);
24 type Pattern_Action
is record
25 Pattern
: Pattern_Access
;
26 Action
: Action_Access
;
29 package Pattern_Action_Table
is new Opt46_Pkg
(Pattern_Action
, Natural, 1);
31 type Session_Data
is record
32 Filters
: Pattern_Action_Table
.Instance
;
35 procedure Close
(Session
: Session_Type
) is
36 Filters
: Pattern_Action_Table
.Instance
renames Session
.Data
.Filters
;
38 for F
in 1 .. Pattern_Action_Table
.Last
(Filters
) loop
39 Free
(Filters
.Table
(F
).Pattern
);
40 Free
(Filters
.Table
(F
).Action
);