`std::unique_ptr` would make all these `delete S` statements implicit.