0

Is there a way to know if my process contains unreleased COM objects? The better way to enumerate them all.

In simple words: I would like to find possible memory leaks followed by COM objects.

Thanks in advance.

Disposer
  • 667
  • 1
  • 7
  • 23
  • See this similar question: http://stackoverflow.com/questions/134086/what-strategies-and-tools-are-useful-for-finding-memory-leaks-in-net – Oscar Sep 19 '13 at 10:58

1 Answers1

1

There is no registry of process COM objects, so there is noone to ask this question. Instantiated COM object in first place is nothing but an existing class instance, with destruction scheduled for later (when reference counter reaches zero).

Something [relatively] close you can do is calling DllCanUnloadNow exported function of a COM DLL loaded into process, expecting that it returns "Yes, you can" if there are no COM objects/references outstanding.

Roman R.
  • 68,205
  • 6
  • 94
  • 158