Will the one who dies and leaves behind wealth to be inherited have a reward for what he left behind, or will that only benefit him before he dies?

Question

The person who accumulates wealth intending to do good for his family and those on whose maintenance he spends, so that he may make them independent of means and treat them kindly, and so that they will not look with avarice to the wealth of other people, and he hopes by doing all of that that he will attain reward from Allah Ta’ala. He will be rewarded for the wealth he leaves behind for his heirs, because this is showing kindness.