Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7919: timer_handle in boost::this_thread::interruptible_wait is not closed, which causes memory leak
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-03-03 18:43:27
#7919: timer_handle in boost::this_thread::interruptible_wait is not closed, which
causes memory leak
--------------------------------------------+-------------------------------
Reporter: cathy.guo@⦠| Owner: viboes
Type: Bugs | Status: assigned
Milestone: To Be Determined | Component: thread
Version: Boost 1.52.0 | Severity: Problem
Resolution: | Keywords: timer handle leak, memory leak
--------------------------------------------+-------------------------------
Comment (by viboes):
The type detail::win32::handle_manager closes the handle on destruction
{{{
class BOOST_THREAD_DECL handle_manager
{
private:
handle handle_to_manage;
handle_manager(handle_manager&);
handle_manager& operator=(handle_manager&);
void cleanup()
{
if(handle_to_manage &&
handle_to_manage!=invalid_handle_value)
{
BOOST_VERIFY(CloseHandle(handle_to_manage));
}
}
public:
//...
~handle_manager()
{
cleanup();
}
};
}}}
Have you had some experience with a memory leak?
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7919#comment:2> 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:12 UTC