ReaderWmf leaks temporary files
#1
I have the following code:

Code:
using (ReaderWmf reader = new ReaderWmf())
{
    Image image = reader.ReadGeometry(metaFile, geometrySettings);
    // ...
}

Every time this section is executed, a EMF file is created in %LOCALAPPDATA%.
There is a first chance exception on the closing brace (i.e. the Dispose call) "The process cannot access the file 'C:\Users\kg\AppData\Local\9333da9f-ef9d-4fd1-ab8a-66d8b0647bc0.emf' because it is being used by another process." Here is the call stack:
Code:
    mscorlib.dll!System.IO.__Error.WinIOError(int errorCode = 0x80070020, string maybeFullPath = "C:\\Users\\kg\\AppData\\Local\\9333da9f-ef9d-4fd1-ab8a-66d8b0647bc0.emf") + 0x321 Bytes    
    mscorlib.dll!System.IO.File.Delete(string path) + 0x99 Bytes    
    Ab2d.ReaderWmf.dll!Ab2d.ReaderWmf.ر() + 0x6c Bytes    
    Ab2d.ReaderWmf.dll!Ab2d.ReaderWmf.Dispose(bool disposing = true) + 0x2b Bytes    
    Ab2d.ReaderWmf.dll!Ab2d.ReaderWmf.Dispose() + 0x22 Bytes

Using Sysinternals ProcessExplorer I found that there is no other process having an open handle to the file (only my program itself).

Klaus

Edit: Maybe this is the same problem as in the post "Problem with ReaderWmf Class in Web Service (WCF)". The metaFile variable in my code snippet is indeed a Stream.
  


Messages In This Thread
ReaderWmf leaks temporary files - by kguetter - 02-14-2012, 05:32 PM
RE: ReaderWmf leaks temporary files - by kguetter - 02-16-2012, 02:27 PM
RE: ReaderWmf leaks temporary files - by abenedik - 02-16-2012, 09:17 PM
RE: ReaderWmf leaks temporary files - by abenedik - 02-24-2012, 11:24 PM

Forum Jump:


Users browsing this thread:
1 Guest(s)