StatsTable::~StatsTable() { // Before we tear down our copy of the table, be sure to // unregister our thread. UnregisterThread(); // Return ThreadLocalStorage. At this point, if any registered threads // still exist, they cannot Unregister. tls_index_.Free(); // Cleanup our shared memory. delete impl_; // If we are the global table, unregister ourselves. if(global_table_ == this) { global_table_ = NULL; } }
CBotThread::~CBotThread() { UnregisterThread(); }
void StatsTable::UnregisterThread() { UnregisterThread(GetTLSData()); }