Frees all the resources allocated by this object.
public void dispose()
If the MainMenu control is the child of a form or control, this method disconnects the main menu from its parent.