.Net 2.0 File Handles
Posted: 2007-06-13T12:40:34-07:00
Hello all,
Anyone have problems with this COM+ object not closing the temp files. I'm converting a ton of Images from JPG to EPS in a .net application. I've tried both the ImageMagickObject and MagicKNet and both seem to leave the temp files open until I exit the application, I am disposing of the object I create in my application but that does not help. For now I can only convert about 400 images then I have to close the application and re-launch before I can continue. Because the system runs out of file handles. I forget the exact error message but I know if I go to the temp folder and try and delete one of the temp files it tells me its in uses.
Thanks
Phil
Here is a code snippet:
using (OrgImage = new MagickNet.Image())
{
OrgImage.Read(OImage);
OrgImage.Write("EPT2:C:\TEMP\"+ ImageName);
}
Anyone have problems with this COM+ object not closing the temp files. I'm converting a ton of Images from JPG to EPS in a .net application. I've tried both the ImageMagickObject and MagicKNet and both seem to leave the temp files open until I exit the application, I am disposing of the object I create in my application but that does not help. For now I can only convert about 400 images then I have to close the application and re-launch before I can continue. Because the system runs out of file handles. I forget the exact error message but I know if I go to the temp folder and try and delete one of the temp files it tells me its in uses.
Thanks
Phil
Here is a code snippet:
using (OrgImage = new MagickNet.Image())
{
OrgImage.Read(OImage);
OrgImage.Write("EPT2:C:\TEMP\"+ ImageName);
}