diff --git a/utils/threadpool/threadpool.h b/utils/threadpool/threadpool.h index 84c9aff7a..16754385d 100644 --- a/utils/threadpool/threadpool.h +++ b/utils/threadpool/threadpool.h @@ -75,9 +75,8 @@ public: boost::thread* create_thread(F threadfunc) { boost::lock_guard guard(m); - std::auto_ptr new_thread(new boost::thread(threadfunc)); - threads.push_back(new_thread.get()); - return new_thread.release(); + threads.push_back(new boost::thread(threadfunc)); + return threads.back(); } void add_thread(boost::thread* thrd)