System.Windows.Forms.ApplicationContext.Dispose Method

Releases all resources used by the System.Windows.Forms.ApplicationContext.

Syntax

public void Dispose ()

Remarks

Call ApplicationContext.Dispose when you are finished using the System.Windows.Forms.ApplicationContext. The ApplicationContext.Dispose method leaves the System.Windows.Forms.ApplicationContext in an unusable state. After calling ApplicationContext.Dispose, you must release all references to the System.Windows.Forms.ApplicationContext so the garbage collector can reclaim the memory that the System.Windows.Forms.ApplicationContext was occupying. For more information, see Cleaning Up Unmanaged Resources and Implementing a Dispose Method.

Note:

Always call ApplicationContext.Dispose before you release your last reference to the System.Windows.Forms.ApplicationContext. Otherwise, the resources it is using will not be freed until the garbage collector calls the System.Windows.Forms.ApplicationContext object's Finalize method.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0