// close_egtb() closes/frees tablebases if necessary void close_egtb() { if (TbSize != 0) { tbcache_done(); tb_done(); paths = tbpaths_done(paths); TbSize = 0; } }
/* * Unload all tablebases and destroy the thread used for probing * during search. */ void unload_gtb(void) { if (!tb_is_initialized()) return; tbcache_done(); tb_done(); tb_paths = tbpaths_done(tb_paths); worker_quit = true; worker_task_ready = true; #ifdef WINDOWS_THREADS while (worker_quit) Sleep(1); CloseHandle(worker_mutex); CloseHandle(worker_thread); #else while (worker_quit) usleep(100); pthread_mutex_destroy(&worker_mutex); #endif }
Tablebase::~Tablebase() { tbcache_done(); tb_done(); paths = tbpaths_done(paths); }
void GaviotaTb::freeTB() { tbcache_done(); tb_done(); paths = tbpaths_done(paths); }
void gtb_clear() { tbcache_done(); tb_done(); tbpaths_done(gtb_paths); }
GTB::~GTB() { tbcache_done(); tb_done(); paths = tbpaths_done(paths); }