aboutsummaryrefslogtreecommitdiff
path: root/src/qt/rpcconsole.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-11-18 16:35:14 +0100
committerLuke Dashjr <luke-jr+git@utopios.org>2016-12-02 07:50:11 +0000
commitc12f4e93b9be01ba2d6e96f0a851562549049686 (patch)
treedd9c2874e1336d0a2fc501875f6d277c7a9527e6 /src/qt/rpcconsole.h
parentdc46b10a087921343bb5a05d08393ece061d6303 (diff)
downloadbitcoin-c12f4e93b9be01ba2d6e96f0a851562549049686.tar.xz
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. Github-Pull: #9190 Rebased-From: 693384eedb1ac7f449e226edd53e2cb52a86e279
Diffstat (limited to 'src/qt/rpcconsole.h')
-rw-r--r--src/qt/rpcconsole.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h
index 28affa954d..c1efa95f8c 100644
--- a/src/qt/rpcconsole.h
+++ b/src/qt/rpcconsole.h
@@ -12,6 +12,7 @@
#include <QWidget>
#include <QCompleter>
+#include <QThread>
class ClientModel;
class PlatformStyle;
@@ -140,6 +141,7 @@ private:
QMenu *banTableContextMenu;
int consoleFontSize;
QCompleter *autoCompleter;
+ QThread thread;
};
#endif // BITCOIN_QT_RPCCONSOLE_H