23 But they who are babes in understanding say:— “If no one has received his reward, why did the Apostle say, When we shall depart from the body, we shall be present with the Lord?” But recollect, my beloved, that I instructed you concerning this matter in the Demonstration concerning Solitaries, that the spirit which the righteous receive, according to its heavenly nature, goes to our Lord until the time of the Resurrection, when it shall come to put on the body in which it dwelt. And at every time it has the memory of this in the presence of God, and looks eagerly for the Resurrection of that body in which it dwelt, as the Prophet Isaiah said about the Church of the Gentiles:— They that make mention of you shall be faithful and stand before the Lord, and you shall not give them rest. But as to the wicked, they have none to make mention of them before the Lord, because the Holy Spirit is far removed from them, because they are animal, and are buried after the manner of animals.
Source: Demonstrations (New Advent)