Hi,
I have an application with a main form
(public __gc class MDIParent:public
FormsAndHelpers::SelfPositioningForm).

I have a menu item on that form that creates another child form
(called CarrierRegionSwitchExplorer).

I remember a pointer to the child form I create, in the Main form,
like this:

System::Void MDIParent::ShowCarrierRegionSwitchExplorer()
{
if (NULL == m_pCarrierRegionSwitchExplorer)
{
m_pCarrierRegionSwitchExplorer=new CarrierRegionSwitchExplorer;
m_pCarrierRegionSwitchExplorer->ShowDialog();
}
}

m_pCarrierRegionSwitchExplorer is a static member of MDIParent,
declared like this:
static CarrierRegionSwitchExplorer *m_pCarrierRegionSwitchExplorer;


When I close the CarrierRegionSwitchExplorer dialog, do I have to get
rid of the child form object I created on the heap? If yes, then where
I create an event handler to do it?

I can't delete m_pCarrierRegionSwitchExplorer on an event handler for
the "Closed" event for the CarrierRegionSwitchExplorer form, it
sounds very wrong to me.

Am I going about stuff the wrong way? Am I completed missing the
"automatic" way .NET can do this for me?

Any pointers are appreciated.

Thanks,
Vishnu