I have a application which involves creating instances of a "Form2" class.
Form2 has an event which I handle in Form1. Instances of Form2 have names
like "Matrix_A", "Matrix_B", etc. To create them I use these "populate"
methods:
private void populateA()
{
if (!(Matrix_A == null))
{
Matrix_A.normalclose = false;
Matrix_A.Close();
}
Matrix_A = new Form2();
L1: Matrix_A.TheEvent += new Form2.TheEventHandler(AMethod);
Blah, Blah, other stuff;
}
Later, the instance of Form2 may be closed and perhaps recreated several
times. Do I need to manage (dispose) the event/handler interface created at
L1 above or does it automatically go away when I close the instance?