In my experience yes because I became responsible and always prioritize the welfare of my family by buying what they need instead of spending the money in gambling. As a parent and a former addicted gambler I dont want my kids to commit the same mistakes, that's why I did my best to overcome this addiction and start over again.
Genes doesnt run in the blood when we talk about gambling because gambling it is not a disease or insanity.
Agree its not hereditary like a disease however we can pass this habit to our kids if we show/expose them in gambling at an early age because they will think its right.