
On Fri, 17 Feb 2006 13:47:06 -0500, Sean Huang wrote
There is a bug in std::basic_iostream in VC8
Thx for tracking this down.
(http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=e...) that affects all classes derived from it. During the output of a ptime, a basic_stringstream object is created/destroyed and that is causing the memory leak. I personally think Microsoft should release a patch for this but it looks like they won't until the next release. You might be able to obtain a hotfix by contacting Microsoft Technical support.
On the other hand, std::basic_ostringstream/std::basic_istringstream do not suffer the same memory leak. And maybe data_time library can change to use them instead of std::basic_stringstream (line 304 in time_facet.hpp as of release 1.33.0). I haven't really looked into data_time library so I can not say this for sure.
Perhaps it would work, but I have to say I feel highly unmotivated to spend my time working trying to work around this vendor bug. This bug is bad enough that anyone seriously using C++ will have to use the workaround patch available on the MS website. Jeff