object = null;<BR><BR>Also, some Classes have .Remove() or .Clear() methods(like collections/lists), depending on the Type, so make sure you look in the docs because you might find a better way to accomplish what you need.
If you are using a runtime callable wrapper(RCW) that you created using tlbimp.exe then the COM component will be destroyed when the RCW is destroyed by the .Net garbage collector. <BR><BR>BUT as this article states:<BR>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmag01/html/INTEROP.asp<BR><BR>Here are two solutions:<BR>1. Call System.GC.Collect function to tell the GC to collect any resources that aren't in use, thereby releasing the COM object. The drawback of that is garbage collection can be an expensive process.<BR><BR>2. System.Runtime.InteropServices.Marshal.ReleaseComO bject