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?
OS X 10.8.1 no longer automatically terminates Xcode 4.4.1 while Xcode is downloading documentation with no windows open. It looks like "they fixed the glitch" of Xcode not properly communicating its "working" status to OS X. Have not tried on Lion, but I would guess that Xcode 4.4.1 no longer is auto-terminated there too when downloading documentation.
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.