From 6f5cbd7e53593c6a35e3959dfabf707e4bfbd788 Mon Sep 17 00:00:00 2001 From: Tony Butler Date: Mon, 25 Oct 2021 00:15:38 -0600 Subject: [PATCH] Fix various memory leaks --- src/core/MoBenchmark.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/MoBenchmark.h b/src/core/MoBenchmark.h index dfd68bd1..064f7824 100644 --- a/src/core/MoBenchmark.h +++ b/src/core/MoBenchmark.h @@ -73,7 +73,7 @@ class MoBenchmark : public IJobResultListener { Job* m_bench_job[BenchAlgo::MAX]; double m_bench_algo_perf[BenchAlgo::MAX]; - std::shared_ptr m_controller; // to get access to config and network + Controller *m_controller; // to get access to config and network bool m_isNewBenchRun; // true if benchmark is need to be executed or was executed MoBenchmark::BenchAlgo m_bench_algo; // current perf algo we benchmark uint64_t m_hash_count; // number of hashes calculated for current perf algo @@ -93,7 +93,7 @@ class MoBenchmark : public IJobResultListener { MoBenchmark(); virtual ~MoBenchmark(); - void set_controller(std::shared_ptr controller) { m_controller = controller; } + void set_controller(std::shared_ptr controller) { m_controller = controller.get(); } void start(); // start benchmarks