You could gamble it all away, but you still owe the money. That is because it is not your money, it is your ex-wife's money.
What if you were to gamble it away when the marriage was falling apart beyond repair but divorce had not been brought up yet?