In one of my VB6 forms, I create several other Form objects and store them in member variables.
Private m_frm1 as MyForm
Private m_frm2 as MyForm
// Later...
Se
Actually, VB6 implements RAII just like C++ meaning that locally declared references automatically get set to Nothing
at the end of a block. Similarly, it should automatically reset member class variables after executing Class_Terminate
. However, there have been several reports that this is not done reliably. I don't remember any rigorous test but it has always been best practice to reset member variables manually.