Share via


DisposableObject Class

Definition

An helper for implementing disposable instances following the recommended pattern.

public class DisposableObject : IDisposable, Microsoft.IDisposableObservable
type DisposableObject = class
    interface IDisposableObservable
    interface IDisposable
Public Class DisposableObject
Implements IDisposable, IDisposableObservable
Inheritance
DisposableObject
Derived
Implements

Constructors

DisposableObject()

Properties

IsDisposed

Gets a value indicating whether the object has been disposed once, protects against double disposal.

Methods

Dispose()

Disposes the current object then suppresses further finalization.

Dispose(Boolean)

Standard virtual overload for IDisposable pattern.

DisposeManagedResources()

Allows derived classes to provide custom dispose handling for managed resources.

DisposeNativeResources()

Allows derived classes to provide custom dispose handling for native resources.

Finalize()

Finalizes an instance of the DisposableObject class.

Applies to