Simplify ownership with std::unique_ptr. NFC.