8000 Fix issue #29688 by cleaning up after ourselves · matplotlib/matplotlib@8d2c1c4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8d2c1c4

Browse files
Fix issue #29688 by cleaning up after ourselves
Objects without a parent are not necessarily cleaned up in PyQt when their reference count reaches zero, and must be explicitly cleaned up with `deleteLater()` This prevents the notifier firing after the signal handling was supposed to have been reset to its previous state.
1 parent 9340190 commit 8d2c1c4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1655,6 +1655,7 @@ def save_args_and_handle_sigint(*args):
16551655
finally:
16561656
wsock.close()
16571657
rsock.close()
1658+
notifier.deleteLater()
16581659
signal.set_wakeup_fd(old_wakeup_fd)
16591660
signal.signal(signal.SIGINT, old_sigint_handler)
16601661
if handler_args is not None:

0 commit comments

Comments
 (0)
0