Article ID: 937214 - Last Review: December 3, 2007 - Revision: 1.1 In the .NET Framework 2.0 SDK, you must explicitly call the IDisposable.Dispose method for all the System.Drawing objects
INTRODUCTIONIn the Microsoft .NET Framework version 2.0 SDK, you must explicitly call the IDisposable.Dispose method for all the System.Drawing objects that are created by an application. You must do this before the objects go out of scope. Note Most of the System.Drawing objects contain unmanaged Microsoft Graphics Device Interface (GDI) resources. Additionally, most of the System.Drawing objects implement the IDisposable interface. MORE INFORMATIONYou must explicitly call the IDisposable.Dispose method for the objects that implement the IDisposable interface. You do not have to explicitly call the IDisposable.Dispose method if the object constructor is called in the expression of a using statement. A using statement defines a scope, and the object is automatically disposed of at the end of the scope. REFERENCESFor more information about the IDisposable.Dispose method in the .NET Framework 2.0 SDK, visit the following Microsoft Developer Network (MSDN) Web site: http://msdn2.microsoft.com/en-us/library/system.idisposable.dispose(vs.80).aspx
(http://msdn2.microsoft.com/en-us/library/system.idisposable.dispose(vs.80).aspx)
For more information about the IDisposable interface in the .NET Framework 2.0 SDK, visit the following MSDN Web site:http://msdn2.microsoft.com/en-us/library/system.idisposable(vs.80).aspx
(http://msdn2.microsoft.com/en-us/library/system.idisposable(vs.80).aspx)
| Other Resources Other Support Sites
CommunityGet Help NowArticle Translations
|





















Back to the top