| 819 | } |
| 820 | |
| 821 | String File::TemporaryFiles_::newFile() |
| 822 | { |
| 823 | String s = getTempDirectory().ensureLastChar('/') + getUniqueName(); |
| 824 | std::lock_guard<std::mutex> _(mtx_); |
| 825 | filenames_.push_back(s); |
| 826 | // do NOT return filenames_.back() by ref, since another thread might resize the vector and invalidate the reference! |
| 827 | return s; // uses RVO, so its efficient |
| 828 | } |
| 829 | |
| 830 | File::TemporaryFiles_::~TemporaryFiles_() |
| 831 | { |
no test coverage detected