13
0

explicitly close tmpfiles before unlink.

fixes issue on export tmpfiles remaining on windows
This commit is contained in:
Robin Gareus 2015-03-02 23:12:06 +01:00
parent a5eb3bae87
commit 5cfa389978

View File

@ -34,6 +34,10 @@ class TmpFile : public SndfileWriter<T>, public SndfileReader<T>
~TmpFile()
{
/* explicitly close first, some OS (yes I'm looking at you windows)
* cannot delet files that are still open
*/
SndfileBase::close();
if (!filename.empty()) {
std::remove(filename.c_str());
}