I don't know what you mean by 'lifecycle'
by lifecycle i mean the RAII Object lifecycle that for example in the case of a std::string it will live inside the scope of the funciotn, and when returned gets invalidated