Closed
Description
In get_keras_h5_layers
, this code:
call json % parse(model_config_json, model_config_string)
allocates the local model_config_json
pointer, but it is not destroyed in this routine, so that's a memory leak. You should add a:
call json % destroy (model_config_json)
At the end to free the memory. The other json_value
pointers all look like they are just pointing to data inside this structure, so you don't have to worry about those.
FYI: the higher-level json_file
class is a little safer (but less flexible) to use since it will destroy the pointer when it goes out of scope (it has a finalizer). What you have here is fine though (you just need the destroy
call at the end).