Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit87b801b

Browse files
authored
Merge pull request#23712 from tacaswell/fix_no_gc_collect
FIX: do not try to help CPython with garbage collection
2 parentsdbe814e +9f3861f commit87b801b

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

‎lib/matplotlib/_pylab_helpers.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
importatexit
66
fromcollectionsimportOrderedDict
7-
importgc
87

98

109
classGcf:
@@ -66,10 +65,6 @@ def destroy(cls, num):
6665
manager.canvas.mpl_disconnect(manager._cidgcf)
6766
manager.destroy()
6867
delmanager,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)
7368

7469
@classmethod
7570
defdestroy_fig(cls,fig):
@@ -82,14 +77,10 @@ def destroy_fig(cls, fig):
8277
@classmethod
8378
defdestroy_all(cls):
8479
"""Destroy all figures."""
85-
# Reimport gc in case the module globals have already been removed
86-
# during interpreter shutdown.
87-
importgc
8880
formanagerinlist(cls.figs.values()):
8981
manager.canvas.mpl_disconnect(manager._cidgcf)
9082
manager.destroy()
9183
cls.figs.clear()
92-
gc.collect(1)
9384

9485
@classmethod
9586
defhas_fignum(cls,num):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp