Well, since I started this whole thing, I have to ask... If it's a singleton, doesn't it need to clean itself up? If the assumption is that the OS will clean it up when the process is killed, isn't that a bit shaky as far as sound assumptions go? Elisha
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Peter Dimov Sent: Friday, August 26, 2005 1:45 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] Boost.Thread memory leak reported
Sohail Somani wrote:
Any dynamically allocated memory that isn't freed is a Bad Thing imho.
Because?
Was it forgotten? Was it intentional? If the assumption is it will always be freed, then there is no ambiguity.
Seems clearly intentional to me - the allocation is invoked by call_once and is a textbook implementation of a thread safe singleton. A "this is not a leak" comment may help.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users