id summary reporter owner description type status milestone component version severity resolution keywords cc 5841 thread.cpp: thread_group: possible resource leak between create_thread/add_thread noloader@… viboes "If add_thread finds the newly created thread in its list, it will not add the thread. However, the thread/pointer will not be properly disposed. In addition, create_thread will return a value which indicates success regardless of the result of add_thread. {{{ thread* thread_group::create_thread(const function0& threadfunc) { std::auto_ptr thrd(new thread(threadfunc)); add_thread(thrd.get()); return thrd.release(); } void thread_group::add_thread(thread* thrd) { mutex::scoped_lock scoped_lock(m_mutex); // For now we'll simply ignore requests to add a thread object multiple // times. Should we consider this an error and either throw or return an // error value? std::list::iterator it = std::find(m_threads.begin(), m_threads.end(), thrd); assert(it == m_threads.end()); if (it == m_threads.end()) m_threads.push_back(thrd); } }}} " Bugs closed To Be Determined thread Boost 1.47.0 Problem invalid viboes