Heroin probably isn't a great example, since kicking it is so much more excruciating than temporary increases in junk food or alcohol consumption. Weed is a much better example; I'm pretty strict about my diet, so during stressful times I notice myself leaning on weed in the way people do with junk food: unconsciously and moderately, rolling it back as soon as I notice it.