Classes that implement IDisposable and have members of IDisposable type should also declare/override Dispose().

Override the Dispose() method.

In the following example, Bad extends the IDisposable class BadBase, but does not override Dispose().

In the revised example, Good overrides Dispose().

  • MSDN: IDisposable Interface.