Use std::unique_ptr directly

2 jobs for master in 25 minutes and 36 seconds (queued for 183 minutes and 35 seconds)