2 ms·
My experience using COM with .net is that the GC does not get the hint that there is significant memory that will be released when it drops the COM wrapper obje
by asveikau 6y ago
My experience using COM with .net is that the GC does not get the hint that there is significant memory that will be released when it drops the COM wrapper object, so a "big" COM object or even many ones will not make the runtime start a collection and it ends up as a leak even though kicking the GC would probably do the right thing.
So I would end up wrapping the objects in IDisposable and calling Marshal.ReleaseComObject on Dispose. Then COM objects were usually wrapped in using() to remain idiomatic for manual cleanup in c#.
That was some years ago.