I have to restart my Mac all the time because I'm using Boot Camp and switching in between Windows 8 and OS X. Every time I restart and come back to OS X, my screen gets flooded with open windows, every thing from Firefox to text editors. Is there any way to set it up so that there are no open windows upon restart?
When you go to shutdown/restart, unclick the check box to disable the resume feature, which is likely what is opening all these windows (that were present upon shutdown).
If this doesn't do it, check that these applications are not in your user start up list.
You have two choices. You can choose that your applications not resume their previous state when you shutdown or restart the Mac by deselecting the checkbox that appears prior to shutdown:
Or you can navigate to the General pane in System Preferences and deselect the Restore windows when quitting and re-opening apps option. However, if you do this, applications will never resume their previous state, even when quit and restarted during a single boot session.
Disable Resume on login permanently
What you are experiencing are the benefits of working with Resume. A feature introduced with Mac OS X Lion to restore windows upon next launch or login.
Unchecking the box does not have a permanent effect. This can be achieved by manual tweaking.
Open the Terminal and enter:
This command downloads the following script and fully installs it:
Et voilà, you are done!
If you want to revert to the default behavior of Resume in lion, type this.
Disable Resume when launching apps
You can also disable Resume for applications on a per app basis. See these answers here.