Questo articolo è stato tradotto automaticamente. Per visualizzare l'articolo in inglese, selezionare la casella di controllo Inglese. È possibile anche visualizzare il testo inglese in una finestra popup posizionando il puntatore del mouse sopra il testo.

Metodo DesignSurface.Dispose ()


Data di pubblicazione: ottobre 2016

Rilascia le risorse usate da DesignSurface.

Spazio dei nomi:   System.ComponentModel.Design
Assembly:  System.Design (in System.Design.dll)

public void Dispose()

The public M:System.ComponentModel.Design.DesignSurface.Dispose method follows the standard T:System.IDisposable pattern. Calling this method destroys the design surface. The protected version of this method is virtual and follows the normal T:System.IDisposable pattern.


Because T:System.ComponentModel.Design.DesignSurface does not have any native code to clean up, it does not have a finalizer that calls M:System.ComponentModel.Design.DesignSurface.Dispose(System.Boolean). If you need to call M:System.ComponentModel.Design.DesignSurface.Dispose(System.Boolean), you must add a finalizer yourself.

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


Always call M:System.ComponentModel.Design.DesignSurface.Dispose before you release your last reference to the T:System.ComponentModel.Design.DesignSurface. Otherwise, the resources it is using will not be freed until the garbage collector calls the T:System.ComponentModel.Design.DesignSurface object's Finalize method.

.NET Framework
Disponibile da 2.0
Torna all'inizio