Possible Duplicate:
What is the lifetime of temporary function arguments?
When are temporary objects destroyed?
It is said that temporary variables are destroyed as the last step in evaluating the full-expression, e.g.
bar( foo().c_str() );
temporary pointer lives until bar returns, but what for the
baz( bar( foo().c_str() ) );
is it still lives until bar returns, or baz return means full-expression end here, compilers I checked destruct objects after baz returns, but can I rely on that?