Why does death make life meaningless?

If life ends in a grave, it means that you will die the meaning and all the thoughts that have accompanied the person throughout his life. A temporary life is meaningless, because it will cease to exist when there is no longer me. No matter how long the equation of your life is, because if its result will be zero - it is just like you have never been born.