I have a class with a finalizer. But since I always call Dispose() , and Dispose() calls GC.SupressFinalize(this) , I think my object never makes it in the finalization queue. The finalizer is just as a backstop if another class user forgets to call Dispose() .
Is there any performance limitation for simply executing the finalizer, even if it has never been called and the object never ends up in the finalization queue?
I hadn’t thought before, but on page 102 of Bill Wagner’s Effective C #: Second Edition, it says, “Even if he never called, the presence of the finalizer does result in a pretty big performance penalty for your types.”
source share