diff --git a/bec_widgets/utils/bec_signal_proxy.py b/bec_widgets/utils/bec_signal_proxy.py index 0055c70e..905aeab2 100644 --- a/bec_widgets/utils/bec_signal_proxy.py +++ b/bec_widgets/utils/bec_signal_proxy.py @@ -80,3 +80,11 @@ class BECSignalProxy(SignalProxy): """ if self.blocked: self.unblock_proxy() + + def cleanup(self): + """ + Cleanup the proxy by stopping the timer and disconnecting the timeout signal. + """ + self._timer.stop() + self._timer.timeout.disconnect(self._timeout_unblock) + self._timer.deleteLater()