Does word "life" have the same meaning in the following two sentences?

While there's life there's hope.

I have known him all his life.
different meanings