ServerManager.Dispose Method

Definition

Releases all resources used by the ServerManager class.

public:
 void Dispose();
public void Dispose ();
member this.Dispose : unit -> unit
Public Sub Dispose ()

Implements

Remarks

Calling the Dispose method invalidates cached configuration system values.

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

Note

Always call <xref:Namespace.Class.Dispose%2A> before you release your last reference to the ServerManager. Otherwise, the resources it is using will not be freed until the garbage collector calls the ServerManager object's Finalize method.

Applies to