X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fthread.cpp;h=048f2a7a053bcbb6cf29110498cd2f339622def7;hp=ef5ae857e30580822b5c05cf2406a413a6eb05f6;hb=dc3a5f791ebf235444864e633564561811fa1244;hpb=be77406a55d1840862237cffe153dc08a83108d3 diff --git a/src/thread.cpp b/src/thread.cpp index ef5ae857..048f2a7a 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -299,9 +299,12 @@ void ThreadPool::init() { void ThreadPool::exit() { delete_thread(timer); // As first because check_time() accesses threads data + timer = nullptr; for (Thread* th : *this) delete_thread(th); + + clear(); // Get rid of stale pointers }