unneeded use of std::unique_ptr::release

This file is also full of `new` where `make_unique` would be more appropriate. Will fix in a separate CL.