View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
wav wav is offline
external usenet poster
 
Posts: 2
Default Excel Process Hanging ( Interop.Excel)

try next code

if (Marshal.IsComObject(app))
{
while (Marshal.ReleaseComObject(app) 0) { };
app = null;
}
GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect();

GC.GetTotalMemory(true);
GC.SuppressFinalize(this);

instid
System.Runtime.InteropServices.Marshal.ReleaseComO bject(app);
app = null;