DialogPage.Dispose Method (Boolean)

Releases the unmanaged resources that are used by a dialog page class and optionally releases the managed resources; the parent class, Component supports unmanaged resources.

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)


Protected Overrides Sub Dispose ( _
    disposing As Boolean _
protected override void Dispose(
    bool disposing
virtual void Dispose(
    bool disposing
) override
abstract Dispose : 
        disposing:bool -> unit 
override Dispose : 
        disposing:bool -> unit 
protected override function Dispose(
    disposing : boolean


  • disposing
    Type: System.Boolean
    true to release both managed and unmanaged resources; false to release only unmanaged resources.


When the disposing parameter is true, this method releases all resources that are held by the managed objects that an instance of a given dialog page class references.

After operating on DialogPage, the implementation calls Dispose on its base class.


A Dispose method can be called multiple times by other objects. When you override Dispose, be careful not to reference objects that have been previously disposed of in an earlier call. For more information about how to implement Dispose, see Implementing a Dispose Method.

.NET Framework Security

See Also


DialogPage Class

Dispose Overload

Microsoft.VisualStudio.Shell Namespace



Other Resources

Implementing a Dispose Method

Options Pages

Toolbox (Visual Studio SDK)

State Persistence and the Visual Studio IDE