1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-13 01:52:50 -05:00

Fixed memory leak

This commit is contained in:
MoneroOcean
2018-08-22 21:49:57 +02:00
parent 541ecc4e4b
commit 1a819c6189
2 changed files with 12 additions and 0 deletions

View File

@@ -71,6 +71,17 @@ Hashrate::Hashrate(size_t threads, xmrig::Controller *controller) :
}
}
Hashrate::~Hashrate()
{
for (size_t i = 0; i < m_threads; i++) {
delete [] m_counts[i];
delete [] m_timestamps[i];
}
delete [] m_counts;
delete [] m_timestamps;
delete [] m_top;
}
double Hashrate::calc(size_t ms) const
{