Ecclesiastes 2:19 (ESV)

19 and who knows whether he will be wise or a fool? Yet he will be master of all for which I toiled and used my wisdom under the sun. This also is vanity.

One of the major dilemmas that the Preacher has realized is that, after a life of hard work, you have to hand over the results to someone else. What you have done and accomplished with great dedication and wisdom, you will have to entrust to someone else. You never know how the other person will deal with it.