Disposes of the resources (other than memory) used by the IDesigner.
[Visual Basic] Sub Dispose() [C#] void Dispose(); [C++] void Dispose() = 0; [JScript] function Dispose();
Call Dispose when you are finished using the IDesigner. The Dispose method leaves the IDesigner in an unusable state. After calling Dispose, you must release all references to the IDesigner so the memory it was occupying can be reclaimed by garbage collection.
Note Always call Dispose before you release your last reference to the IDesigner. Otherwise, the resources the IDesigner is using will not be freed until garbage collection calls the IDesigner object's destructor.
This disposal method should be called when the designer should be destroyed. It will be called before the designer's component is disposed. The designer should detach any events it is listening to at this time. It should not dispose of the component it is designing, however.
IDesigner Interface | IDesigner Members | System.ComponentModel.Design Namespace