views:

55

answers:

2

Since a finalizer being called usually indicates a missing Dispose() call, I would like determine what finalizers are being called.

A: 

How about:-

System.Diagnostics.Debug.WriteLine(this.GetType());
AnthonyWJones
That is good for my classes. I would like that ability for framework classes also.
jyoung
Tricky, if you could examine what is passing through the freachable queue that might give you a clue but I wouldn't know how to do that. I agree with shahkalpesh, a profiler could highlight where something disposable isn't being disposed.
AnthonyWJones
+1  A: 

I am not sure what could be the right answer. But profilers/perfromance counters can help in this regard.

shahkalpesh