COM objects usually have deterministic destruction: they are freed when the last reference is released.
How is this handled in C# - COM Interop? The classes don\'t
We've suffered from this quite a lot. It's best not to try to load too many interop references into the .Net runtime. Also, you can use the Marshal.ReleaseComObject API if you need to release something right away.
Another good method is to refactor your client code to use typesafe wrappers around the interop code - if you have a known reference in your code to each and every interop RCW, this increases the chance that the interop reference will be GCed in a timely fashion. The main problem this seeks to avoid is the one of "too many dots":
foo.bar.quux.xyzzy.groo(); // where foo, bar, quux and xyzzy are all COM references
Each of the objects between dots in the above code is effectively leaked (probably not really in the long run) since we have an implicit reference to the instance. You would need to create named references to each of the instances in order to have a good chance to clean them up:
Foo foo;
Bar bar=foo.bar;
Quux quux=bar.quux;
Xyzzy xyzzy=quux.xyzzy;
xyzzy.groo();
Now possibly use the runtime to release the reference:
ReleaseComObject(xyzzy); // etc...