If a function returns a temporary, you probably don't want to hold onto it with a "const Foo& foo". The temporary will get deallocated and then you'll be left with a reference to dead memory, which is bad new bears:
http://trac.webkit.org/changeset/68984 http://trac.webkit.org/changeset/68985 This kind of thing can be tricky to spot in code reviews because it's not obvious at the call site whether a function turns a temporary or a reference to some existing object. Adam _______________________________________________ webkit-dev mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

