File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
testsuite/tests/huge_formula Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 4
4
-- related to the number of variables to solve for.
5
5
6
6
with Ada.Text_IO ; use Ada.Text_IO;
7
+ with Ada.Unchecked_Deallocation ;
7
8
8
9
with AdaSAT.Formulas ;
9
10
with AdaSAT.Helpers ;
@@ -12,10 +13,15 @@ procedure Test is
12
13
use AdaSAT;
13
14
use AdaSAT.Formulas;
14
15
16
+ type Model_Access is access Model;
17
+
18
+ procedure Free is new Ada.Unchecked_Deallocation
19
+ (Model, Model_Access);
20
+
15
21
Var_Count : constant := 1_000_000 ;
16
22
17
23
F : Formula;
18
- M : access Model := new Model'(1 .. Var_Count => Unset);
24
+ M : Model_Access := new Model'(1 .. Var_Count => Unset);
19
25
begin
20
26
F.Append (new Literal_Array'((+1 , +Var_Count)));
21
27
for I in Variable (2 ) .. Var_Count loop
26
32
else
27
33
Put_Line (" Failed solving" );
28
34
end if ;
35
+ Free (M);
29
36
end Test ;
You can’t perform that action at this time.
0 commit comments