diff --git a/atom_core/src/atom_core/dataset_io.py b/atom_core/src/atom_core/dataset_io.py index f8910a92..eca3a0d5 100644 --- a/atom_core/src/atom_core/dataset_io.py +++ b/atom_core/src/atom_core/dataset_io.py @@ -414,6 +414,8 @@ def loadJSONFile(json_file): f = open(json_file, 'r') dataset = json.load(f) + f.close() # Close the file to prevent memory leaks + return dataset