Gambling addictions can be worst sometimes believe me my friend sometimes if not restricted theor could go on to hurt themselves or others like those that go into crimes just to found their gambling cravings, such addict is better off locked up and if possible get rehabilitated in the prison since his crime is now covering his addictions.
To overcome gambling addictions, one need to first of all come to self agreement and readiness to quite at all cost, this is very important and the first step to overcoming their addictions self realizations and determination is key to beating addictions.
You can't force change - locking them up wouldn't change anything, it would only create hatred and at the end achieved nothing. The only way to make them change is to make them see reasons, be supportive, don't be judgemental, talk them into new hobbies, talk them about the consequences, talk them into quiting, not funding their gambling actions, not treating them like criminals and most importantly, be patient with them.
Quiting addiction is not something that happens overnight, it's difficult to change the lifestyle you're used it.