Upon the death of either spouse, the survivor may continue to possess and occupy the whole homestead until it is otherwise disposed of according to law, but the setting off of the distributive share of the survivor in the real estate of the deceased shall be such a disposal of the homestead as is herein contemplated.