X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fthread.cpp;h=50412468ebb83222caf15a8b4b9835f018b7aa63;hp=541610a1ca4b2bd5a63d16323c4d2aed991aae21;hb=8dcb4bc3cce1f487cfac65ed20d21378d0f39b2e;hpb=0a003d3ba1e3082132606d06159693aaa805a138 diff --git a/src/thread.cpp b/src/thread.cpp index 541610a1..50412468 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -196,9 +196,9 @@ void ThreadPool::init() { } -// d'tor cleanly terminates the threads when the program exits. +// exit() cleanly terminates the threads before the program exits. -ThreadPool::~ThreadPool() { +void ThreadPool::exit() { for (size_t i = 0; i < threads.size(); i++) delete threads[i];