In This Article

DisposableObjectBase Class

A simple object that implements the IDisposable interface.

public abstract class DisposableObjectBase : IDisposable
Inheritance:
object object
Implements:
IDisposable

Constructors

DisposableObjectBase()

Initializes an instance of the class.

protected DisposableObjectBase()

Methods

Dispose()

Releases all resources used by the object.

public void Dispose()

Dispose(bool)

Releases the unmanaged resources used by the object and optionally releases the managed resources.

protected abstract void Dispose(bool disposing)
Parameter Type Description
disposing bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Remarks

This method is called by the public Dispose() method and the Finalize method. Dispose invokes this method with the disposing parameter set to true. Finalize invokes this method with disposing set to false.

~DisposableObjectBase()

Finalizes clean-up of the class instance as it is being garbage collected.

protected ~DisposableObjectBase()

Inherited Members

Extension Methods