Fixed issue 2403
authorRoy Reapor <roynos@gmail.com>
Thu, 4 Oct 2012 05:44:29 +0000 (22:44 -0700)
committerRoy Reapor <roynos@gmail.com>
Thu, 4 Oct 2012 05:44:29 +0000 (22:44 -0700)
Created temporary files are now deleted in Win32.

modules/core/src/system.cpp

index f85f78a..0b56d8a 100644 (file)
@@ -487,6 +487,8 @@ string tempfile( const char* suffix )
     if(0 == ::GetTempFileNameA(temp_dir, "ocv", 0, temp_file))
         return string();
 
+    DeleteFileA(temp_file);
+
     string name = temp_file;
     if(suffix)
     {