Does garbage collector call Dispose()? [duplicate]

The GC does not call Dispose, it calls your finalizer (which you should make call Dispose(false)).

Please look at the related posts on the side or look up the C# best practices for the Dispose pattern (The docs on IDisposable explain it quite well IIRC.)

Leave a Comment