Re: [Boost-users] Boost.Thread memory leak reported
-----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.
I understand its not a leak. There should atleast be a comment there saying we are not going to deallocate this memory that is allocated once. Its great you know, but part of this thread would have been avoided had there been that comment.
participants (1)
-
Sohail Somani