>Should my C# application specifically release the VFP COM component? If yes, how?
>
>Thanks
Hi Mark,
From what I know you should not.
Runtime Callable Wrapper (RCW) manages COM creation. So, COM lifetime is controlled by Common Language Runtime. The COM component is freed from memory when .Net garbage collector calls the Finalize() method in Runtime Callable Wrapper. Internally it calls Release() of IUknown interface of the actual COM object.
To explicitly remove COM object from memory you can invoke the static method on Marshal class in System.Runtime.InteropServices namespace:
using System.Runtime.InteropServices;
Marshal.ReleaseComObject(myComObjectRCW);
See also:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vcoricominteroptutorial.asp
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison