System.Windows.Forms.ImageList.Dispose Method

Releases the unmanaged resources used by the used by the System.Windows.Forms.ImageList, and optionally releases managed resources.

Syntax

protected override void Dispose (bool disposing)

Parameters

disposing
true to release both managed and unmanaged resources; false to release only unmanaged resources.

Remarks

Call ImageList.Dispose(bool) when you are finished using the System.Windows.Forms.ImageList. The ImageList.Dispose(bool) method leaves the System.Windows.Forms.ImageList in an unusable state.

Note:

Always call ImageList.Dispose(bool) before you release your last reference to the System.Windows.Forms.ImageList. Otherwise, the resources the System.Windows.Forms.ImageList is using will not be freed until garbage collection calls the System.Windows.Forms.ImageList object's destructor.

Requirements

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