Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3dc4467

Browse files
authored
Merge pull request #8450 from anntzer/dont-bother-disconnecting-on-timerqt-__del__
MNT: Don't bother disconnecting signals in TimerQt.__del__.
2 parents 1ffd66d + 9cf7369 commit 3dc4467

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

lib/matplotlib/backends/backend_qt5.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -206,16 +206,6 @@ def __init__(self, *args, **kwargs):
206206
self._timer.timeout.connect(self._on_timer)
207207
self._timer_set_interval()
208208

209-
def __del__(self):
210-
# Probably not necessary in practice, but is good behavior to
211-
# disconnect
212-
try:
213-
TimerBase.__del__(self)
214-
self._timer.timeout.disconnect(self._on_timer)
215-
except RuntimeError:
216-
# Timer C++ object already deleted
217-
pass
218-
219209
def _timer_set_single_shot(self):
220210
self._timer.setSingleShot(self._single)
221211

0 commit comments

Comments
 (0)