NavigationItem.IDisposable.Dispose Method

Definition

Releases all resources used by the NavigationItem.

 virtual void System.IDisposable.Dispose() = IDisposable::Dispose;
void IDisposable.Dispose ();
Sub Dispose () Implements IDisposable.Dispose

Implements

Remarks

Call <xref:Microsoft.Web.Management.Client.NavigationItem.System.IDisposable.Dispose%2A> when you are finished using the NavigationItem. The <xref:Microsoft.Web.Management.Client.NavigationItem.System.IDisposable.Dispose%2A> method leaves the NavigationItem in an unusable state. After calling <xref:Microsoft.Web.Management.Client.NavigationItem.System.IDisposable.Dispose%2A>, you must release all references to the NavigationItem so the garbage collector can reclaim the memory that the NavigationItem was occupying. For more information, see Cleaning Up Unmanaged Resources and Implementing a Dispose Method.

Note

Always call <xref:Microsoft.Web.Management.Client.NavigationItem.System.IDisposable.Dispose%2A> before you release your last reference to the NavigationItem. Otherwise, the resources it is using will not be freed until the garbage collector calls the NavigationItem object's Finalize method.

Applies to