-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Jens Theisen Sent: Tuesday, January 24, 2006 10:33 AM To: boost-users@lists.boost.org Subject: Re: [Boost-users] thread library
monade wrote:
Ok, it may be no memory leak, but only a harmless resource leak (as Alexandrescu calls it in his singleton chapter), but I don't like it anyway (my own singletons does not leak).
If there would be a delete in the destructor, you would not gain anything: The destructor of a singleton is conceptually called on program termination and that's also where all resources are freed by the operating system anyway. So it's perfectly reasonable to not free it.
I could've sworn we just went through this a few months back. Perhaps its time to put a comment that links to the appropriate boost mailing thread. http://lists.boost.org/boost-users/2005/08/13538.php Might be related?