Ending a long-term relationship is a sticky situation. Who gets dibs on your favorite restaurant? Who gets the dog? Who gets the couch? But sometimes, the most contentious question of all is: Who keeps which friends?

When you're a couple, you share things -- and people. You might witness the birth of nieces and nephews that you love like your own. You might genuinely adore his best friend or his sister, and pretty soon you've integrated two respective circles into what feels like one. But do these attachments last if the relationship doesn't? In most cases, the answer is no.

A breakup with a guy generally means a breakup with his friends and family, too. Does it mean you have to give them the stink eye across the room at a restaurant? No. Does it mean you have to ignore them if you run into them at the supermarket? No. But you both need to move on, and you each need the support of your own friends and family to do it.

Men have rules for situations like this. "Guy code" dictates that men remain fiercely loyal to their friends, and place those friendships above anything else after a breakup. Even if the breakup itself was fairly drama-free, trying to share friends after the fact can create drama, and most men would rather avoid this altogether.

But what about their wives and girlfriends? Can you remain friends with them? Though it may seem more innocent, this setup is just as tricky. Here are 3 rules to follow to ensure that you don't cross the line by maintaining your mutual friends:

Rule 1: Observe the 6-month rule.
Relationship expert and dating coach Lauren Frances suggests you stick to a 6-month buffer zone after the breakup where you avoid hanging out with your ex's friends and their significant others. "This is common courtesy, will prevent you both from feeling awkward, and give everyone the space to transition into new relationships," Frances explains. The last thing either of you need is to plan a night out with friends, only to find out your ex is going to be there.

Rule 2: Don't talk about your ex.
Even if you were close with these women, it's not your place to rely on them during the vulnerable period after a breakup. "Call your own best friends for support, and conversely allow your ex the freedom to go to his own breakup support team for comfort," says Frances. Likewise, "Don't pry and try to get his best friends to gossip about him or inform on him and who he's dating."

Rule 3: Be respectful of special events.
"Divvy up the big events like weddings, parties, and birthdays so that the person with the strongest/longest primary relationship attends," suggests Frances. Making appearances at his friends' functions can make an otherwise happy day feel awkward for him (not to mention his new squeeze), and vice versa.

Do you agree or disagree? Have you successfully stayed friends with someone you met through an ex? We want to hear all about it, so leave a comment and let us know.