From 838c642310dc4fba3d598bd3df806f612a7c68de Mon Sep 17 00:00:00 2001 From: James Nightingale Date: Sun, 10 Nov 2024 18:51:45 +0000 Subject: [PATCH] add gc --- autoarray/plot/wrap/base/figure.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/autoarray/plot/wrap/base/figure.py b/autoarray/plot/wrap/base/figure.py index fb25da2e4..51fe28a13 100644 --- a/autoarray/plot/wrap/base/figure.py +++ b/autoarray/plot/wrap/base/figure.py @@ -92,5 +92,6 @@ def close(self): """ Wraps the Matplotlib method 'plt.close' for closing a figure. """ - if plt.fignum_exists(num=1): - plt.close() + plt.close() + import gc + gc.collect()