Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/json_file_module.F90
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ subroutine json_file_load(me, filename, unit)
!! (if not present, a newunit
!! is used)

call me%destroy()
call me%core%load(file=filename, p=me%p, unit=unit)

end subroutine json_file_load
Expand All @@ -875,6 +876,7 @@ subroutine json_file_load_from_string(me, str)
class(json_file),intent(inout) :: me
character(kind=CK,len=*),intent(in) :: str !! string to load JSON data from

call me%destroy()
call me%core%deserialize(me%p, str)

end subroutine json_file_load_from_string
Expand Down Expand Up @@ -1997,7 +1999,7 @@ subroutine json_file_add(me,p,destroy_original)
destroy = .true. ! default
end if

if (destroy) call me%core%destroy(me%p)
if (destroy) call me%destroy()

me%p => p

Expand Down