Skip to content

Instantly share code, notes, and snippets.

@davecra
Created July 3, 2017 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davecra/b18dbe1fa7e2d3adb5729971b8e5b570 to your computer and use it in GitHub Desktop.
Save davecra/b18dbe1fa7e2d3adb5729971b8e5b570 to your computer and use it in GitHub Desktop.
Typical COM Release Object
Marshal.ReleaseComObject(excelWorkbook);
Marshal.ReleaseComObject(excelApp);
excelApp = null;
excelWorkbook = null;
GC.Collect();
GC.Collect();
GC.WaitForPendingFinalizers();
GC.WaitForFullGCComplete();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment