I always remove myself when I feel I have over stayed my welcome. Not that I hate the person or they hate me, they are just in a different place than you are and you don’t fit in anymore. You can always tell as they stop talking to you or when they do it’s more of a cold conversation, brief and to the point.
Still, one carries a Love for the person, set it free sort of thing. remember the good times that bring a smile to your face and in very special cases call them in 20 years and hear the excitement in their voices when you know they feel the same way.