.netcomcom-interop

Method System.Runtime.InteopServices.Marshal.ReleaseCOMObject doesn't kill all object


Why a dll registered into COM+ components has "Activated Count" equal 1 even if the caller process(.net 2.0 Assembly) always use the method System.Runtime.InteopServices.Marshal.ReleaseCOMObject() ?

ReleaseCOMObject really disactivate object if the counter is greater of 1 but remain always one object active until timeout expired.


Solution

  • This is very similar to another question on SO

    Why use FinalReleaseComObject instead of ReleaseComObject?

    Generally the remaining refcount indicates that there is another managed object holding onto a reference that has not yet been garbage-collected. (Usually the RCW)