Replace the line
base.Dispose( disposing );
by
IDisposable disposable = base as IDisposable;
if (disposable != null)
{
disposable.Dispose(disposing);
}
In case that your
base
class does not implement
IDisposable
, the
disposable
object will be null - do not call
Dispose
here.
And the method in your class should be
public
or
public virtual
or
public override
, not only
protected
.