Find the lifetime bug in this generated job hierarchy.
C++
#include <memory>
#include <string>
#include <utility>
class Job {
public:
virtual void run() = 0;
~Job() = default;
};
class FileJob final : public Job {
public:
explicit FileJob(std::string path) : path_(std::move(path)) {}
void run() override {}
private:
std::string path_;
};
std::unique_ptr<Job> make_job() {
return std::make_unique<FileJob>("report.csv");
}