Killing COM object from C# -
I have a COM object that we are calling from C #. It works great, and I have my own objects, whenever I want to be able to use it. Now I have to kill the object. I have tried to release the COM object explicitly and then collected the trash from another thread, but it does not do anything, is there any other idea to kill this object? Thanks for the help.
I have tried
system time. Interact Services Mursal Release Com Object (myApp); GC.Collect (); GC VATForming Finishers (); MyApp = null;
And I make it by
myApplication.ApplicationClass myApp = new myApplication.ApplicationClass ();
This complete code is written in this COM object vb6, below is the C # code vb6 component phone
myApplication.ApplicationClass myApp = new myApplication ApplicationClass ( ); String user = this._User; String pass = this._Pass; String company = this.companyNumber; Try {if (myApp.Login (Ref: user, Rif Pass, referee company))
{// Make some actions} Other {Throw New System. Exposition (MISESOSLOSNSAR); }} {System.Runtime.InteropServices.Marshal.ReleaseComObject (myApp) at the end;
GC.Collect (); GC.WaitForPendingFinalizers (); M2MApp = null; Thanks
> Probably just to swap two rows, because my app is your reference to your object: or try to repeat it to zero:
while (system time); MyApp = null ; GC.Collect (); GC VATForming Finishers ();
Comments
Post a Comment