Image.Dispose Method (Boolean)

 
Use BaseTrue

Releases the unmanaged resources used by the Image and optionally releases the managed resources.

Namespace:   System.Drawing
Assembly:  System.Drawing (in System.Drawing.dll)

protected virtual void Dispose(
	bool disposing
)

Parameters

disposing
Type: System.Boolean

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

System_CAPS_noteNote

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

.NET Framework
Available since 1.1
Return to top
Show: