Closed tidus004 closed 3 years ago
I'll take a look.
What compiler are you using? And what version of json-fortran (the latest 8.2.3 release?)
gfortran GNU Fortran (Homebrew GCC 11.1.0_1) 11.1.0
I am compiling and using the latest version on the website.
Thanks for reporting this!
On the 488-empty-array-leak
branch now,
valgrind --leak-check=full \
--show-leak-kinds=all \
--track-origins=yes \
--verbose \
--log-file=valgrind-out.txt ./jf_test_49
now gives All heap blocks were freed -- no leaks are possible
Super!
Hi All,
I am not 100% whether this is an error that I encountering as I am not entirely an expert on the json-fortran library, but it seems to me that when I deserialize a json file that consists of an empty library, I get a memory leak.
For instance, when running the following simple code through valgrind
type(json_file) :: json
call json%deserialize('{"Substance":[]}')
I get the following error
The code perfectly runs and does exactly what I am expecting and no errors. A simple way that I will use to fix the error is just to remove empty lists from the message, but it's definitely consuming computational power.
I am missing something?
Thanks!