"...what if you don't have someone who is also a programmer to take it over?"
Someone else may. And I mean some random person on the internet who cares to
do so. This is not guaranteed of course. Unless the software is well-like by
other people, it may very well just die.
As an example, I picked up two programs that originally came out in the
1980s. They were licensed under the GPLv2 or any later version (see Beyond
The Titanic and Supernova at http://jxself.org/git/.) They were first
upgraded to GPLv3 and then the modifications to them are under the AGPLv3,
all thanks to the "or any later version" clause as well as the GPL/AGPL
compatibility language in each license.
This shows that is isn't necessary to first put the software into the public
domain in order for this hypothetical person to come along and continue
working on it under the GPL. It's out there, it's free, and it'll continue to
be regardless of who is or isn't alive but you can't really force anyone to
take it over. And hey - you're dead anyway, so you probably don't care if
they do or not. :)