This doesn't work: `temp_name` is deleted at the end of the block, so that `t_name_ptr` then points to deallocated memory. You need to create `t_name` in the same scope as `t_name_ptr`