Skip to content

Commit 6d32e3f

Browse files
committed
Remove unnecessary del local variables at end of Gcf.destroy.
`del manager, num` made sense prior to 9f3861f when we used to then call gc.collect(1) (so we needed to delete the variables from the local frame so that they can be gc'ed if needed), but we have since then removed the explicit gc call; thus the del statement doesn't really do anything anymore (the local frame is about to be destroyed and thus all local variables will be decref'ed anyways).
1 parent d48b2a8 commit 6d32e3f

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

lib/matplotlib/_pylab_helpers.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ def destroy(cls, num):
6464
if hasattr(manager, "_cidgcf"):
6565
manager.canvas.mpl_disconnect(manager._cidgcf)
6666
manager.destroy()
67-
del manager, num
6867

6968
@classmethod
7069
def destroy_fig(cls, fig):

0 commit comments

Comments
 (0)