@@ -39,26 +39,34 @@ subroutine test_37(error_cnt)
3939 call json% initialize(no_whitespace= .true. )
4040
4141 call json% deserialize(p, CK_' {"a": ["1", "2", "3"]}' )
42- f = json_file(p,no_whitespace= .true. )
42+ ! f = json_file(p,no_whitespace=.true.) ! memory leak in gfortran?
43+ call f% initialize(no_whitespace= .true. )
44+ call f% add(p)
4345 call f% print (int (error_unit,IK))
4446 write (error_unit,' (A)' ) ' '
4547 call check_for_error()
4648 call f% destroy()
4749
4850 call json% deserialize(p, CK_' {"b": ["4", "5", "6"]}' )
49- f = json_file(p,json)
51+ ! f = json_file(p,json) ! memory leak in gfortran?
52+ call f% initialize(json)
53+ call f% add(p)
5054 call f% print (int (error_unit,IK))
5155 write (error_unit,' (A)' ) ' '
5256 call check_for_error()
5357 call f% destroy()
5458
55- f = json_file(CK_' {"x": [1,2,3]}' ,no_whitespace= .true. )
59+ ! f = json_file(CK_'{"x": [1,2,3]}',no_whitespace=.true.) ! memory leak in gfortran?
60+ call f% initialize(no_whitespace= .true. )
61+ call f% deserialize(CK_' {"x": [1,2,3]}' )
5662 call f% print (int (error_unit,IK))
5763 write (error_unit,' (A)' ) ' '
5864 call check_for_error()
5965 call f% destroy()
6066
61- f = json_file(CK_' {"y": [4,5,6]}' ,json)
67+ ! f = json_file(CK_'{"y": [4,5,6]}',json) ! memory leak in gfortran?
68+ call f% initialize(json)
69+ call f% deserialize(CK_' {"y": [4,5,6]}' )
6270 call f% print (int (error_unit,IK))
6371 write (error_unit,' (A)' ) ' '
6472 call check_for_error()
@@ -69,26 +77,34 @@ subroutine test_37(error_cnt)
6977 ! also test default character kind when unicode is enabled:
7078
7179 call json% deserialize(p, CDK_' {"a": ["1", "2", "3"]}' )
72- f = json_file(p,no_whitespace= .true. )
80+ ! f = json_file(p,no_whitespace=.true.) ! memory leak in gfortran?
81+ call f% initialize(no_whitespace= .true. )
82+ call f% add(p)
7383 call f% print (int (error_unit,IK))
7484 write (error_unit,' (A)' ) ' '
7585 call check_for_error()
7686 call f% destroy()
7787
7888 call json% deserialize(p, CDK_' {"b": ["4", "5", "6"]}' )
79- f = json_file(p,json)
89+ ! f = json_file(p,json) ! memory leak in gfortran?
90+ call f% initialize(json)
91+ call f% add(p)
8092 call f% print (int (error_unit,IK))
8193 write (error_unit,' (A)' ) ' '
8294 call check_for_error()
8395 call f% destroy()
8496
85- f = json_file(CDK_' {"x": [1,2,3]}' ,no_whitespace= .true. )
97+ ! f = json_file(CDK_'{"x": [1,2,3]}',no_whitespace=.true.) ! memory leak in gfortran?
98+ call f% initialize(no_whitespace= .true. )
99+ call f% deserialize(CDK_' {"x": [1,2,3]}' )
86100 call f% print (int (error_unit,IK))
87101 write (error_unit,' (A)' ) ' '
88102 call check_for_error()
89103 call f% destroy()
90104
91- f = json_file(CDK_' {"y": [4,5,6]}' ,json)
105+ ! f = json_file(CDK_'{"y": [4,5,6]}',json) ! memory leak in gfortran?
106+ call f% initialize(json)
107+ call f% deserialize(CDK_' {"y": [4,5,6]}' )
92108 call f% print (int (error_unit,IK))
93109 write (error_unit,' (A)' ) ' '
94110 call check_for_error()
0 commit comments