Depends on the app. Emacs can survive and re-attach later. A single emacs session can be connected to multiple X (and tty) sessions at a time. I use this all day, my emacs session runs for weeks or months between restarts and I just connect/disconnect to X servers or ttys as needed.