Cory Monteith died of a drug overdose over the weekend. / Jordan Strauss, Jordan Strauss/Invision/AP

by Liz Szabo, USA TODAY

by Liz Szabo, USA TODAY

People such as Cory Monteith who have used heavy drugs can have an increased risk of a fatal overdose in the period after leaving rehab, doctors say.

The British Columbia coroner confirmed Tuesday that Monteith, from the TV show Glee, died of an overdose of heroin and alcohol.

The actor, 31, whose body was found at the Fairmount Pacific Rim hotel in Vancouver, had checked himself into drug rehab in April.

Rehab can be lifesaving, and it helps many addicts get clean for good. But addicts can be vulnerable to overdose after going through a detox program, because their bodies are no longer able to tolerate high doses of drugs, says Neal Benowitz, a professor of medicine at the University of California-San Francisco. He has no personal knowledge of Monteith's case.

Heroin users develop a tolerance over time, so they need larger amounts of the drug to get high. Their bodies become able to withstand large amounts of the drug, Benowitz says.

Monteith had a long history of drug use. In an interview with Parade magazine in 2011, Monteith said that his drug use had spiraled out of control when he was a teen and that he was "doing anything and everything, as much as possible."

Once those drugs are cleared from person's system, however, taking a big dose all at once can prove fatal, Benowitz says.

"Among people who have been clean and sober, if they go back into the habit, they will usually start at the same dose that they had before," says John Brown, an attending physician at San Francisco General Hospital's emergency room. "Their body is now sensitive to it. They've essentially reset their body."

Heroin produces euphoria by binding to receptors on nerve cells in the brain, Brown says. But many of those receptors are located on nerve cells that regulate breathing.

So heroin suppresses respiration not by damaging the lungs but by damaging parts of the brain that tell the lungs to breathe, Brown says.

The combination can create a vicious cycle, Brown says. The brain fails to send the proper signals, so breathing slows. That causes cells to become deprived of oxygen, which further decreases brain activity.

Addicts can die because they simply stop breathing, Brown says.

Alcohol, which also suppresses a person's breathing and heart rate, amplifies heroin's depressant effects, Benowitz says. And when people are drinking, they may be more likely to use drugs, as well as fail to pay attention to how much they're taking.

Doctors can sometimes save overdose patients by giving them oxygen and medication to reverse the effects of heroin on the brain, Brown says. People who survive can be left with brain damage, because their brains were deprived of oxygen.