I've created a new instance of my options form with the using
directive, so it is disposed of automatically when I'm finished with it. Do I need to dispose of the dynamically-created controls on the form before closing it, or will they be automatically disposed of when I call this.Close()
?
Generally no, all controls are dynamically created. Usually in the InitializeComponent() method, it isn't fundamentally different when the code appears somewhere else. Dynamically removing controls is what can get you into trouble.
Controls are automatically disposed when their Parent is disposed. So as long as you have them added to their parent through its Collection property then you don't need extra code to dispose. The trigger is closing the window for a form that's displayed with the Show() method, the using statement in your code for a form that's displayed with ShowDialog().
You can check that you got it right by using Task Manager. Add the USER Objects
column with View + Select Columns (right-click the listview header in Windows 8). The counter is very reliable. Repeatedly creating and closing your form must not constantly increase the displayed value.
Leaking USER Objects is a very common bug in Winforms, the garbage collector does not keep you out of trouble. Always be very wary of any ControlCollection.Clear() or Remove/At() statement in your code.