Basic exception guarantee testcases (redux)
Stephen M. Webb
stephen.webb@bregmasoft.com
Wed Nov 20 08:43:00 GMT 2002
On November 19, 2002 11:32 pm, Benjamin Kosnik wrote:
> >I found that std::deque Does the Right Thing regarding honouring the basic
> >exception guarantee in its copy constructor, hence that test passes.
> >std::vector fails to Do the Right Thing and brings dishonour and shame to
> > the Community.
>
> Dishonour and shame! That's bad news indeed.
Please hold...
> I think this is ready to go in. Objections and comments in the next
> 24hrs please.
I have good news and bad news. The bad news is that my test cases that
showed memory leaks were missing a line to reset the allocation counts. The
good news is that with the addition of that line, they prove that std::vector
does not leak memory, at least not in the copy constructor.
I figure it's easier if the original patch goes in as is and I can submit a
further patch to fix the testcase afterwards.
--
Stephen M. Webb
More information about the Libstdc++
mailing list