I just tried it with two different programs, kate and gvim. While kate is killed with closing the terminal, surprisingly gvim is not.
After a short research I found out that gvim seems to detach itself from the terminal. When I start it as background process, the shell notifies me with its process ID:
tobi@monster ~ :) % gvim &
In this case the process ID is 6629. If I now grep for gvim in a ps output I come to this:
 + done gvim
tobi@monster ~ :) % ps aux | grep gvim
tobi 6632 0.0 0.1 160048 12652 ? SNs 22:57 0:00 gvim
tobi 6638 0.0 0.0 4816 1048 pts/0 S+ 22:59 0:00 grep --color=auto gvim
So gvim seems to start another process (PID 6632) and ends the starting process (PID 6629).
Sadly, I have no clue how to get that to the foreground if it is not a GUI application.