Skip to content

Commit

Permalink
deallocate objects in Fortran examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Radonirinaunimi committed Feb 11, 2025
1 parent 7542747 commit b5fe4c6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions examples/fortran/test-deprecated.f90
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ program test_pineappl

grid2 = pineappl_grid_clone(grid)

! Remove objects from Memory
deallocate(bin_limits_left)
deallocate(bin_limits_right)
deallocate(bin_normalizations)

call pineappl_grid_delete(grid2)

lumi2 = pineappl_grid_lumi(grid)
Expand Down Expand Up @@ -161,6 +166,10 @@ program test_pineappl
error stop "error: pineappl_grid_convolve_with_two"
end if

! Remove objects from Memory
deallocate(result)
deallocate(string)

call pineappl_keyval_delete(key_vals)

call pineappl_keyval_delete(key_vals2)
Expand Down
8 changes: 8 additions & 0 deletions examples/fortran/test.f90
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ program test_pineappl

grid2 = pineappl_grid_clone(grid)

! Remove objects from Memory
deallocate(bin_limits_left)
deallocate(bin_limits_right)
deallocate(bin_normalizations)

call pineappl_grid_delete(grid2)

channels2 = pineappl_grid_channels(grid)
Expand Down Expand Up @@ -189,6 +194,9 @@ program test_pineappl
error stop "error: pineappl_grid_convolve"
end if

! Remove objects from Memory
deallocate(result)

call pineappl_channels_delete(channels)

call pineappl_grid_delete(grid)
Expand Down

0 comments on commit b5fe4c6

Please sign in to comment.