mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-17 23:56:23 +08:00
Rewrite the way application exits
Centralize in a single object all the global resources management and avoid a bunch of sparse exit() calls. This is more reliable and clean and more stick to C++ coding practices. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -90,7 +90,7 @@ MaterialInfoTable::MaterialInfoTable(unsigned int numOfEntries) {
|
||||
{
|
||||
std::cerr << "Failed to allocate " << (numOfEntries * sizeof(MaterialInfo))
|
||||
<< " bytes for material hash table." << std::endl;
|
||||
exit(EXIT_FAILURE);
|
||||
Application::exit_with_failure();
|
||||
}
|
||||
clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user