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
committerWladimir J. van der Laan <laanwj@gmail.com>2016-11-23 12:33:36 +0100
commit693384eedb1ac7f449e226edd53e2cb52a86e279 (patch)
tree898d2bc8d3667c56bdd32c656b03f478e305d99f /src/qt/rpcconsole.h
parent47db07537746940ee7dd0739a8c73e328837813f (diff)
downloadbitcoin-693384eedb1ac7f449e226edd53e2cb52a86e279.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.
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 8c20379a8c..344d5ecb98 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;
@@ -148,6 +149,7 @@ private:
QMenu *banTableContextMenu;
int consoleFontSize;
QCompleter *autoCompleter;
+ QThread thread;
/** Update UI with latest network info from model. */
void updateNetworkState();