diff options
-rw-r--r-- | src/corelib/thread/qthread_unix.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp index 5a50646..6b34b5f 100644 --- a/src/corelib/thread/qthread_unix.cpp +++ b/src/corelib/thread/qthread_unix.cpp @@ -136,6 +136,12 @@ static void create_current_thread_data_key() pthread_key_create(¤t_thread_data_key, destroy_current_thread_data); } +static void destroy_current_thread_data_key() +{ + pthread_key_delete(current_thread_data_key); +} +Q_DESTRUCTOR_FUNCTION(destroy_current_thread_data_key) + QThreadData *QThreadData::current() { pthread_once(¤t_thread_data_once, create_current_thread_data_key); |