Xcode auto-quit in Mountain Lion On Lion, Xcode quit on its own when it was downloading documentation with no windows open. Is it safe to have Xcode download documentation in Mountain Lion or will it still quit on its own if all windows are closed?
According to OS X Daily, you can disable auto-terminate in Lion and Mountain Lion with the following terminal command:

defaults write -g NSDisableAutomaticTermination -bool yes


This sets the NSDisableAutomaticTermination flag in the defaults database that OS X consults to get various settings.

Note that this will disable automatic termination for all applications, not just Xcode.