Re: [Boost-bugs] [Boost C++ Libraries] #4639: boost thread library leaks pthread_key

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4639: boost thread library leaks pthread_key
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-12-11 01:47:57


#4639: boost thread library leaks pthread_key
--------------------------------+-------------------------------------------
  Reporter: gleonid@… | Owner: viboes
      Type: Bugs | Status: assigned
 Milestone: To Be Determined | Component: thread
   Version: Boost 1.44.0 | Severity: Problem
Resolution: | Keywords: pthread_key_create pthread_key_delete
--------------------------------+-------------------------------------------

Comment (by viboes):

 Do you mean something like adding this to once.cpp


 {{{
   namespace
   {
     const pthread_once_t pthread_once_init_value=PTHREAD_ONCE_INIT;
     struct BOOST_THREAD_DECL delete_epoch_tss_key_on_dlclose_t
     {
       ~delete_epoch_tss_key_on_dlclose_t()
       {
         if(memcmp(&epoch_tss_key_flag, &pthread_once_init_value,
 sizeof(pthread_once_t)))
         {
           pthread_key_delete(epoch_tss_key);
         }
       }
     };
     delete_epoch_tss_key_on_dlclose_t delete_epoch_tss_key_on_dlclose;
   }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4639#comment:5>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:08 UTC