Martin Sevior wrote:
> On Tue, 19 Jun 2001, Dom Lachowicz wrote:
[...]
> > void foo() {
> > UT_String bar = "hiya";
> > doSomething(bar);
> > // destructor implicity gets called as we leave scope
> > }
> >
>
> I can say that I've experimentally determined that pointers pointing to
> bar.c_str() inside foo , point to garbage outside foo.
I'd bloody hope so! Sorry for the exlamation mark, but _obviously_ it's
pointing to he.. after it has gone out of scope.
You wouldn't try to use an out-of-scope stack variable, would you?! ;->
/Mike