DesignSurface::Dispose Method ()
Releases the resources used by the DesignSurface.
Assembly: System.Design (in System.Design.dll)
The public Dispose method follows the standard IDisposable pattern. Calling this method destroys the design surface. The protected version of this method is virtual and follows the normal IDisposable pattern.
Note |
|---|
Because DesignSurface does not have any native code to clean up, it does not have a finalizer that calls Dispose(Boolean). If you need to call Dispose(Boolean), you must add a finalizer yourself. |
Call Dispose when you are finished using the DesignSurface. The Dispose method leaves the DesignSurface in an unusable state. After calling Dispose, you must release all references to the DesignSurface so the garbage collector can reclaim the memory that the DesignSurface was occupying. For more information, see Cleaning Up Unmanaged Resources and Implementing a Dispose Method.
Note |
|---|
Always call Dispose before you release your last reference to the DesignSurface. Otherwise, the resources it is using will not be freed until the garbage collector calls the DesignSurface object's Finalize method. |
Available since 2.0
