David Carradine's wife has just settled her case against the production company of the movie David was shooting when he died of auto-erotic asphyxiation ... TMZ has learned.

Anne Carradine had sued MK2 Productions, claiming they had a duty to supervise David while he was on the shoot for the movie, "Stretch." Anne claims the night David died in his Thailand hotel room, the production staff had gone to dinner and told David he would have to make his own arrangements for the evening.

Sources tell us that MK2 paid Anne money to settle. And, we're told the other defendants -- including the hotel and insurance company have settled as well.