4 ms·
The "canonical" implementation of IDisposable includes a finalizer. As you said, that's the only time I've seen it used. Adding finalizers to classes has perfor
by vishbar 10y ago
The "canonical" implementation of IDisposable includes a finalizer. As you said, that's the only time I've seen it used. Adding finalizers to classes has performance implications as well as the CLR will add any object with a finalizer to the finalizer queue (hence the GC.SuppressFinalize(this) you always see in implementations of IDisposable).