Skip to content

Commit

Permalink
loadJSONFile now closes the file after opening it to prevent memory l…
Browse files Browse the repository at this point in the history
…eaks
  • Loading branch information
Kazadhum committed May 3, 2024
1 parent a7e0a9c commit e8afa64
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions atom_core/src/atom_core/dataset_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit e8afa64

Please sign in to comment.