Killing COM object from C#
- by Pradeep
I have a COM object that we are calling from C#. This works great, and I have my own pool of objects that I can use whenever I want. Now I need to kill the object. I've tried releasing the COM object explicitly and then garbage collecting from another thread, but that does nothing. Does anyone have any other ideas to kill this object? Thanks for the help.
I've tried
System.Runtime.InteropServices.Marshal.ReleaseComObject(myApp);
GC.Collect();
GC.WaitForPendingFinalizers ();
myApp = null;
and I create it by
myApplication.ApplicationClass myApp = new myApplication.ApplicationClass();
Thanks,
Pradeep