#include <cstdlib>
#include <ctime>
#include <iostream>
+#include <memory>
#include <thread>
using namespace std;
srand(time(NULL));
// Stealer threads
- std::thread *threads = new std::thread[s_nDequeStealerThreadCount];
+ std::unique_ptr<std::thread[]> threads(
+ new std::thread[s_nDequeStealerThreadCount]);
for (ullong i = 0; i < s_nDequeStealerThreadCount; i++) {
threads[i] = std::thread(StealerThread, i);
}