diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-11-18 16:35:14 +0100 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2016-12-02 07:50:11 +0000 |
commit | c12f4e93b9be01ba2d6e96f0a851562549049686 (patch) | |
tree | dd9c2874e1336d0a2fc501875f6d277c7a9527e6 /src/qt/rpcconsole.h | |
parent | dc46b10a087921343bb5a05d08393ece061d6303 (diff) | |
download | bitcoin-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.h | 2 |
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 |