Is the word "life" used in the same way in the following two sentences?

While there's life there's hope.

Having experienced both, the vampire decided that he preferred (un)death to life.
the same meaning