File tree 1 file changed +0
-9
lines changed 1 file changed +0
-9
lines changed Original file line number Diff line number Diff line change 4
4
5
5
import atexit
6
6
from collections import OrderedDict
7
- import gc
8
7
9
8
10
9
class Gcf :
@@ -66,10 +65,6 @@ def destroy(cls, num):
66
65
manager .canvas .mpl_disconnect (manager ._cidgcf )
67
66
manager .destroy ()
68
67
del manager , num
69
- # Full cyclic garbage collection may be too expensive to do on every
70
- # figure destruction, so we collect only the youngest two generations.
71
- # see: https://github.com/matplotlib/matplotlib/pull/3045
72
- gc .collect (1 )
73
68
74
69
@classmethod
75
70
def destroy_fig (cls , fig ):
@@ -82,14 +77,10 @@ def destroy_fig(cls, fig):
82
77
@classmethod
83
78
def destroy_all (cls ):
84
79
"""Destroy all figures."""
85
- # Reimport gc in case the module globals have already been removed
86
- # during interpreter shutdown.
87
- import gc
88
80
for manager in list (cls .figs .values ()):
89
81
manager .canvas .mpl_disconnect (manager ._cidgcf )
90
82
manager .destroy ()
91
83
cls .figs .clear ()
92
- gc .collect (1 )
93
84
94
85
@classmethod
95
86
def has_fignum (cls , num ):
You can’t perform that action at this time.
0 commit comments