Add explanatory comment.
This commit is contained in:
parent
ae4cfc9f0b
commit
91349d109e
|
@ -163,6 +163,10 @@ class ElectrumWindow(QMainWindow, PrintError):
|
||||||
self.connect(self, QtCore.SIGNAL('network'), self.on_network_qt)
|
self.connect(self, QtCore.SIGNAL('network'), self.on_network_qt)
|
||||||
interests = ['updated', 'new_transaction', 'status',
|
interests = ['updated', 'new_transaction', 'status',
|
||||||
'banner', 'verified']
|
'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)
|
self.network.register_callback(self.on_network, interests)
|
||||||
# set initial message
|
# set initial message
|
||||||
self.console.showMessage(self.network.banner)
|
self.console.showMessage(self.network.banner)
|
||||||
|
|
Loading…
Reference in New Issue