tAdd explanatory comment. - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 91349d109e8c6d32578f64519de09f9c3e00d28c DIR parent ae4cfc9f0b69a3e12cb3e468c4841579c11b385d HTML Author: Neil Booth <kyuupichan@gmail.com> Date: Fri, 13 Nov 2015 23:42:46 +0900 Add explanatory comment. Diffstat: M gui/qt/main_window.py | 4 ++++ 1 file changed, 4 insertions(+), 0 deletions(-) --- DIR diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py t@@ -163,6 +163,10 @@ class ElectrumWindow(QMainWindow, PrintError): self.connect(self, QtCore.SIGNAL('network'), self.on_network_qt) interests = ['updated', 'new_transaction', 'status', 'banner', 'verified'] + # To avoid leaking references to "self" that prevent the + # window from being GC-ed when closed, callbacks should be + # methods of this class only, and specifically not be + # partials, lambdas or methods of subobjects. Hence... self.network.register_callback(self.on_network, interests) # set initial message self.console.showMessage(self.network.banner)