> The auto_ptr<> idea sounds invasive (and made me wonder - why not go the
> whole way and use std::string?)
That would work for me too :)
>
> Here's an implementation of the xstrdup_for_dump idea.
>
> To recap the motivation:
>
> cgraph*.c and ipa-*.c use xstrdup on strings when dumping them v
The auto_ptr<> idea sounds invasive (and made me wonder - why not go the
whole way and use std::string?)
Here's an implementation of the xstrdup_for_dump idea.
To recap the motivation:
cgraph*.c and ipa-*.c use xstrdup on strings when dumping them via
fprintf, leaking all of the duplicated buffe