diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-11-18 16:35:14 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-11-23 12:33:36 +0100 |
commit | 693384eedb1ac7f449e226edd53e2cb52a86e279 (patch) | |
tree | 898d2bc8d3667c56bdd32c656b03f478e305d99f /src/qt/rpcconsole.h | |
parent | 47db07537746940ee7dd0739a8c73e328837813f (diff) |
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.h | 2 |
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(); |