Not necessary. These dialogs have a Dispose () method only because they inherit one from the Component class. They do not redefine the method, since in reality they have nothing to dispose of. All system resources that they use are freed when the dialog box is closed. The implementation of Component.Dispose () also does not make any order; it simply ensures that the component will be removed from the IContainer collection.
This is otherwise an implementation detail of these dialog wrappers. Other components commonly used for Dispose (), ToolTip is a good example. The automatically created Dispose method for the form ensures that this happens; check the "components" field in the Designer.cs source code file. That's why the component has a Dispose method, which by default does nothing important.
There is one interesting point, to avoid removing a component in the form, it allows the .NET wrapper class to collect garbage for a dialog. But a kilobyte or so that saves is micro-optimization.
Take this at face value: if the early use of these class objects were important, Microsoft would not have made their components.
source share