Patrick Dempsey's wife, Jillian, filed for divorce in January 2015, however, the couple never went through with it and the actor explained what they did to make their marriage work.

Dempsey opened up to People in its latest issue about how he did not want a divorce from his partner of 15 years and the effort it took to repair their relationship.

"Our marriage was not something I was prepared to let go of," he said. "I didn't feel like we had done all the work. And we both wanted to do that work. That's where it started."

The former Grey's Anatomy star recalled how it felt knowing that his union could end. "It's always destabilizing when you're potentially breaking up a family or you have a big section of your life that's ending."

But they decided not to give up and eventually went to couples counseling to help work through some issues.

"Everybody has their own path. Jill and I decided it was time to work on our issues and improve. We wanted to be role models for our kids like, 'OK, if you have differences, you can work them out.'"

The couple has three children together and now their union is strong again. So how are him and Jillian making it work today ?

"You've got to keep at it," he said. "You've got to communicate and stay open and not get lazy. And not give up. And lots of sex!"

The issue hits newsstands on Sept. 19 and Dempsey's new film Bridget Jones Baby will be in theaters on Sept. 16.