From 693384eedb1ac7f449e226edd53e2cb52a86e279 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Fri, 18 Nov 2016 16:35:14 +0100 Subject: qt: Prevent thread/memory leak on exiting RPCConsole Make ownership of the QThread object clear, so that the RPCConsole can wait for the executor thread to quit before shutdown is called. This increases overall thread safety, and prevents some objects from leaking on exit. --- src/qt/rpcconsole.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/qt/rpcconsole.h') diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h index 8c20379a8c..344d5ecb98 100644 --- a/src/qt/rpcconsole.h +++ b/src/qt/rpcconsole.h @@ -12,6 +12,7 @@ #include #include +#include class ClientModel; class PlatformStyle; @@ -148,6 +149,7 @@ private: QMenu *banTableContextMenu; int consoleFontSize; QCompleter *autoCompleter; + QThread thread; /** Update UI with latest network info from model. */ void updateNetworkState(); -- cgit v1.2.3