System.Windows.Forms.Cursor.Dispose Method

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

Syntax

public void Dispose ()

Remarks

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

Note:

Always call Cursor.Dispose before you release your last reference to the System.Windows.Forms.Cursor. Otherwise, the resources it is using will not be freed until the garbage collector frees it.

Requirements

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