Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary del local variables at end of Gcf.destroy. #27498

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Dec 11, 2023

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).

PR summary

PR checklist

`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).
@QuLogic QuLogic added this to the v3.9.0 milestone Dec 12, 2023
@timhoffm timhoffm merged commit 4b3f0cb into matplotlib:main Dec 12, 2023
41 checks passed
@anntzer anntzer deleted the undel branch December 12, 2023 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants