From c33033b2f44a799d361f9f6a012a571857b73d69 Mon Sep 17 00:00:00 2001 From: SChernykh Date: Thu, 14 Jul 2022 14:28:06 +0200 Subject: [PATCH] Code cleanup --- src/side_chain.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/side_chain.cpp b/src/side_chain.cpp index a2042d3..916d5e2 100644 --- a/src/side_chain.cpp +++ b/src/side_chain.cpp @@ -173,6 +173,7 @@ SideChain::SideChain(p2pool* pool, NetworkType type, const char* pool_name) LOGINFO(4, "running " << numThreads << " pre-calculation workers"); + m_precalcWorkers.reserve(numThreads); for (uint32_t i = 0; i < numThreads; ++i) { m_precalcWorkers.emplace_back(&SideChain::precalc_worker, this); } @@ -2021,6 +2022,7 @@ void SideChain::finish_precalc() m_precalcWorkers.shrink_to_fit(); delete m_uniquePrecalcInputs; + m_uniquePrecalcInputs = nullptr; uv_mutex_destroy(&m_precalcJobsMutex); uv_cond_destroy(&m_precalcJobsCond);