I've had the most trouble with the latter, particularly from people I wouldn't touch with somebody else's barge pole developing obsessions with me. That can drag on for a while, often leading to uncomfortable situations.
I don't think I've ever "fallen in love", to me, attraction can happen instantly, but it takes a while to develop. If I catch feelings of attraction as soon as I know they're not reciprocated, I can easily stop myself from developing deeper feelings for that person.
What I find hardest is when I'm interested in somebody and they give me mixed signals, especially with guys and especially with a friend of mine who has a girlfriend. Then I find it harder to close the door on my attraction and I'm never sure if they're flirting or just being friendly. This can then turn into a situation which drags on and on and on, sometimes for years, never certain, and I'm too much of a coward to risk a friendship for the prospect of a relationship.