No, it doesn't! result is an auto variable! Once it goes out of scope, the object will be deleted and your function will return a dangling pointer!


His words are wise, his face is beard.