[libstdc++ PATCH] Fix leak in _Rb_tree::_M_insert (stl_tree.h)
Earl Chew
earl_chew@agilent.com
Fri Feb 25 18:48:00 GMT 2005
Chris Jefferson wrote:
> I apologise if I'm saying something really stupid, but from my looking
> at the source code to stl_tree.h, it looks like _M_create_node just
> allocates memory and doesn't actually do any tree based things.
> Therefore why not just delay declaring the _Link_type until after the
> __insert_left initalisation? Then there is no need for a try{...}catch{...}
That's a great idea.
I'll re-run the test and post the results.
Earl
More information about the Libstdc++
mailing list