Skip to content

Commit 96a1e09

Browse files
Update MC_GeoPHIRES3.py
Calling plt.close() to free memory
1 parent d72254c commit 96a1e09

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/geophires_monte_carlo/MC_GeoPHIRES3.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,7 @@ def main(command_line_args=None):
531531
if html_path:
532532
save_path = Path(Path(html_path).parent, f'{fname}.png')
533533
plt.savefig(save_path)
534+
plt.close()
534535
full_names.add(save_path)
535536
short_names.add(fname)
536537

@@ -566,6 +567,7 @@ def main(command_line_args=None):
566567
if html_path:
567568
save_path = Path(Path(html_path).parent, f'{fname}.png')
568569
plt.savefig(save_path)
570+
plt.close()
569571
full_names.add(save_path)
570572
short_names.add(fname)
571573
annotations = ''

0 commit comments

Comments
 (0)