Boost logo

Boost :

From: Jeff Garland (jeff_at_[hidden])
Date: 2006-02-18 12:32:39


On Sat, 18 Feb 2006 01:37:16 -0500, Sean Huang wrote
> From: "Jeff Garland" <jeff_at_[hidden]>
>
> >> 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
>
> I can totally understand your reluctance. This is really a show-
> stopper bug for many of us. But your efforts will certainly be
> appreciated by many boost users. You could also consider the work-
> around as a minor improvement if I undertsand it correctly.

Since I don't normally test with msvc8 it's alot of work for me to setup an
environment to see if making the chang would be effective -- I didn't see
anything on the MS site that made it clear that moving to basic_ostringstream
would actually resolve the problem. However, if you want to try out some
replacements and verify that using ostringstream will work, I'm willing to
test and put in the changes. So specifically if you replace
std::basic_stringstream with std::basic_ostringstream in
date_time/time_facet.hpp that should be a reasonable test to see if there is
an effect. I've attached a changed version of the file which compiles and
runs on Linux. Let me know.

Jeff




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk