D and C

Does a d&c clean everything out? Including sperm? I know that having sex before my d&c won't result in pregnancy, but I'm just wondering. I had a d&c a few weeks ago and had sex the whole week before it & 2 weeks after it