Credit: Gregg DeGuire/FilmMagic

Michelle McNamara, a true crime writer who was married to comedian Patton Oswalt, has died.

Oswalt’s publicist Kevin McLaughlin, who confirmed the news to EW, told the Associated Press that she died in her sleep Thursday at the age of 46 — “a complete shock to her family and friends, who loved her dearly,” he said.

A graduate of the University of Notre Dame, McNamara received a master’s degree in creative writing from the University of Minnesota. She married Oswalt, the actor and comedian known for roles in Ratatouille, The King of Queens, Magnolia, and more, in 2005.

She launched the websiteTrue Crime Diary, which cataloged cold cases and breaking news, at her husband’s urging. “I was always doing this research to satisfy my own curiosity,” she said in a 2007 interview with “I realized there was so much information online available about these unsolved cases that wasn’t making it to the news. … [Oswalt] saw me yelling at the news anchors getting it wrong or I had it first or something. He said, ‘Well, you should start a website.’ So I kind of just did it almost as a lark at first, not figuring it would become such a regular thing.”

Indeed, McNamara soon became known for her compelling writing and smart amateur detective work, even serving as a resource for police departments, helping to make connections between unsolved murders. She wrote about the 1976 murder of nurse Melanie Howell and the Golden State Killer, but focused primarily on cases that were little known or ignored by the media. “I’m drawn to cases that aren’t so high profile, that are maybe even a little neglected, but which have enough evidence and clues that anyone with a will and an Internet connection can try to piece together the puzzle,” she told The Codex in 2011.

She said she aspired to maintain sensitivity and objectivity in her true crime writing, avoiding some of the grislier aspects common to the genre. “These are real people; their pain is tremendous,” she said in the 2011 interview. “I’m not being naive or disingenuous — I realize my blog isn’t about fruit flies or Civil War heroes. There’s an element of mystery and drama to the stories I cover. But the overriding motivation remains sharing cold case stories, finding answers, and seeing those responsible put away.”

McNamara is survived by Oswalt and their 7-year-old daughter, Alice.