fix FigureCanvasTkAgg memory leak via weakrefs#25097
Conversation
|
I think it is worth the risk to backport memory-leak fixes. |
|
The flake8 is understood and fixed else where already. |
|
This could lead to user breakage since things that were once immortal are now possibly short lived, just like in the original issue. |
|
Maybe that was a hasty comment. They should live until someone calls |
|
Okay, having convinced myself that these changes work I think it seems fine. @richardsheridan are you still thinking that things may be too short lived, or was that last comment pretty convinced it is okay? |
|
I'm satisfied that those binds won't be released too early from any practical user perspective. |
PR Summary
Fixes #24820
May be worth checking if the memory leak tests can be tightened.
PR Checklist
Documentation and Tests
pytestpasses)Release Notes
.. versionadded::directive in the docstring and documented indoc/users/next_whats_new/.. versionchanged::directive in the docstring and documented indoc/api/next_api_changes/next_whats_new/README.rstornext_api_changes/README.rst