In This Article

DisposableObjectBase Class

Provides a base class that implements the IDisposable interface. This class functions in accordance with the Disposable design pattern.

public abstract class DisposableObjectBase : IDisposable
Inheritance:
object object
Derived:
ShellObjectBase WindowsShellService CanvasDrawContext
Implements:
IDisposable

Constructors

DisposableObjectBase()

Initializes a new instance of the DisposableObjectBase class.

protected DisposableObjectBase()

Remarks

The default constructor initializes all fields to their default values.

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 virtual 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()

Allows an object to attempt to free resources and perform other cleanup operations before the object is reclaimed by garbage collection.

protected ~DisposableObjectBase()

Inherited Members