Yes, because of his omniscience, God knows whether or not someone will attain heaven or choose hell. He makes that person, even a person he knows will choose hell, because he loves that person and because he grants that person the gift of free will. Will would not be truly free if it did not include the tragic possibility of choosing self over God. In order to grant us the gift of free will, and therefore the possibility of freely choosing to love him, God must accept that some people will choose against him.
Secondly, just as one cannot know in this life whether he will attain heaven, he cannot know until the moment of death whether he will definitively choose hell. So long as there is life there is the possibility that the person can be touched and converted by God’s grace and attain heaven. Such a possibility is what gives us hope that even those who have appeared to die as hardened atheists might have had an interior conversion at the moment before death and been saved.