"At a certain point, I had the courage to say, 'I'm going to walk away and I'm just going to pray that you don't die,' " the actress tells PEOPLE

Sarah Jessica Parker on the Lessons She Learned from Her Ill-Fated Romance with Robert Downey Jr.

The duo were together from 1984-91, and covering this week’s issue of PEOPLE, Parker, 52, opens up about the relationship — as well as marriage, motherhood and four decades of fame.

Get push notifications with news, features and more.

The actress says she learned a valuable lesson from her romance with Downey Jr., 52, who has spoken openly about struggling with addiction before he got sober in 2002.

Image zoom Robert Downey Jr. and Sarah Jessica Parker in 1991 Tom Wargacki/WireImage

“I learned how to take care of myself,” she says. “There was a huge amount of time spent making sure he was okay. At a certain point, I had the courage to say, ‘I’m going to walk away and I’m just going to pray that you don’t die.’ ”

Parker also admits that she “didn’t know” about Downey Jr.’s addiction “for a long time.”

“I was like, ‘Why is his heart beating so fast? Don’t do so many pushups before bed!’ ” she recalls.

“I will say, I don’t regret any of it,” she adds. “I don’t resent the time spent.”

For much more on Sarah Jessica Parker, pick up this week’s issue of PEOPLE, on newsstands Friday

Image zoom

Parker also opens up about her experience working on the iconic 1984 film Footloose — during which time she says she fell for her costar, the late Chris Penn.

“It was heavenly because, first of all, it was Kevin Bacon. I’d gone to the movie theater like 11 times to see Diner,” she says of being on set. “And there I was, working with him. And I fell in love with Chris Penn.”

“I learned that it’s great to have your heart broken,” she adds, reflecting on what she learned from the experience. “I hated it, it was miserable. But getting your heart broken is necessary. You know that you can love somebody and you have resilience.”

Image zoom Sarah Jessica Parker James Devaney/GC Images

RELATED VIDEO: Sarah Jessica Parker’s Riveting Breakdown of 10 Memorable Sex and the City Looks — Including the Iconic Tutu

Of course, Parker is now happily married to Broderick, 55. The two dated for five years before making it official on May 19, 1997, after inviting 100 of their closest friends to New York for what the guests thought was a party. Instead, Parker walked down the aisle in her now-iconic black wedding dress. Since then, the two have become parents to 8-year-old twins Tabitha and Loretta and son James Wilkie, 15.

“It seems so silly, but I think you’re very lucky if you like the person,” she says. “I still just really like him. I’m sure I annoy him and he annoys me, but I literally learn about him every day. I’m like, ‘You’re doing what? You’re reading what?’ ”

“I think marriage has a lot of vitality,” she adds. “If you’re fortunate, it’s like this dazzling organism.”