`MCAutoStringRef::operator =` takes care of retaining the value given, so you must just use `p_name = env -> name;`