aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/DaemonManager.h
diff options
context:
space:
mode:
authorxiphon <xiphon@protonmail.com>2020-04-27 12:39:41 +0000
committerxiphon <xiphon@protonmail.com>2020-04-27 12:46:15 +0000
commit9748974ce04207e6d80b2cff99980cd614608d86 (patch)
treec46045bd0a5f31dd22f21f028f4252b34578df88 /src/daemon/DaemonManager.h
parent585fb2810dc0d9b79255b9bd479559b36aa087d8 (diff)
downloadmonzero-gui-9748974ce04207e6d80b2cff99980cd614608d86.tar.gz
monzero-gui-9748974ce04207e6d80b2cff99980cd614608d86.tar.xz
monzero-gui-9748974ce04207e6d80b2cff99980cd614608d86.zip
DaemonManager: fix memory leak
Diffstat (limited to 'src/daemon/DaemonManager.h')
-rw-r--r--src/daemon/DaemonManager.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/daemon/DaemonManager.h b/src/daemon/DaemonManager.h
index e670373c..83fb9cd1 100644
--- a/src/daemon/DaemonManager.h
+++ b/src/daemon/DaemonManager.h
@@ -29,6 +29,9 @@
#ifndef DAEMONMANAGER_H
#define DAEMONMANAGER_H
+#include <memory>
+
+#include <QMutex>
#include <QObject>
#include <QUrl>
#include <QProcess>
@@ -78,7 +81,8 @@ private:
static DaemonManager * m_instance;
static QStringList m_clArgs;
- QProcess *m_daemon;
+ std::unique_ptr<QProcess> m_daemon;
+ QMutex m_daemonMutex;
bool initialized = false;
QString m_monerod;
bool m_has_daemon = true;