Full disclosure: after thirty years of practicing family law, I've never done a detective divorce... which is not to say that detectives don't marry... and divorce. The subject of detectives having spouses, as well as the role of love and sex in mystery fiction, have long been fun and controversial issues.
Raymond Chandler wrote in his Notes on the Detective Story, "A really good detective never gets married." With that said, we've all read enough mysteries to know that this is not entirely true and that there are many married detectives, even some happily married.
One of my recent reads that I thoroughly enjoyed was Louise Penny's first Chief Inspector Gamache novel, Still Life. In addition to being a charming and wonderful mystery set in a small Canadian village, the formidable and clever protagonist has these thoughts about his wife, "After thirty-two years of marriage he still couldn't get enough of Reine-Marie. He knew if she accompanied him on a murder investigation she would do the appropriate thing."
Compare this to the amazing Ken Bruen's protagonist, Jack Taylor, of whom it is said: Jack brings death and pain to everyone he loves. If ever there was an investigator who was not marriage material, it would be the literate but flawed Jack Taylor.
One problem lies with figuring out what role, if any, sex should play in the mystery novel. Elaine Raco Chase in her article, "Sex and the Mystery", amusingly points out, "Even the inscrutable Charlie Chan, whose eleven children made reading the Kama Sutra unnecessary, never dallied with his wife while he was hot on the heels of a villain." Looking at the more hard-boiled protagonists, Chase notes, "The Golden Age of the mystery brought in the lone-wolf detective. His version of sex walked in on million-dollar legs that never ended and large breasts that strained against a thin sweater."
Gladys Mitchell recited the old school version of the role of love in a detective story in her article, "The Most Asked Question: Why do People Read Detective Stories?" She said, "Of old, the purists laid down the axiom that love had no place in a detective story and was nothing but an unnecessary and most undesirable effluent when introduced into those otherwise unpolluted waters."
Time has a way of changing almost everything and love, sex, and marriage in the mystery genre are no exception. Brian DePalma said, "I think traditional noir doesn't work in contemporary storytelling because we don't live in that world anymore."
Or said slightly differently: the heart knows what the heart wants. If the detective wants a love interest or wife, who are we to say no. Even Raymond Chandler's rules are made to be broken!