Do you have any tips against attachment developing after casual flings or even just against attachment to a person in general?

I don‘t really wanna develop such things most of the time but it comes by itself too often for me.