`r_name = temp` would work fine here, and no need to copy and delete `temp` then