Hi,
Consider the following code where 'CM' is a reference to a ContextMenu:
MenuItem[] menuItems=new MenuItem[]{
new MenuItem("Add",new EventHandler(MI_Click)),
new MenuItem("Remove",new EventHandler(MI_Click))
};
CM=new ContextMenu(menuItems);
In the Dispose() override for my containing form, clearly I'll want to
call Dispose against 'CM'. Must I call Dispose() against the inner MenuItems
that were assigned to 'CM' as well? Does calling CM.Dispose() automatically
Dispose() of the MenuItems that 'CM' contains? I imagine not since the user
may want to reuse these MenuItems for other purposes after the disposal of
CM.
Thanks...