threading_posix: don't delete thread_local thread object
Disabling on exit thread delete as it causes an assert fail. There isn't a leak here because current_thread_ is a thread_local static.
This commit is contained in:
parent
aa332dcc8e
commit
5fa59fc4a9
|
@ -1007,7 +1007,10 @@ Thread* Thread::GetCurrentThread() {
|
|||
pthread_t handle = pthread_self();
|
||||
|
||||
current_thread_ = new PosixThread(handle);
|
||||
atexit([] { delete current_thread_; });
|
||||
// TODO(bwrsandman): Disabling deleting thread_local current thread to prevent
|
||||
// assert in destructor. Since this is thread local, the
|
||||
// "memory leaking" is controlled.
|
||||
// atexit([] { delete current_thread_; });
|
||||
|
||||
return current_thread_;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue