public override void Cleanup() { try { EventArgs args = new Dynamo.Nodes.ExcelCloseEventArgs(false); Controller.ShutDown(false, args); this.Controller = null; } catch (Exception ex) { Console.WriteLine(ex.StackTrace); } base.Cleanup(); GC.Collect(); }