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;
|