I had to get a restraining order from an ex?

So I decided there is nothing wrong with going out with other people; especially since Devon and I weren’t even dating. We were taking a break. Devon really does have a good heart but he has shown up at my apartment when specifically asked not to and I’ve caught him in places he knows I go and he doesn’t typically go. Tonight he was freaking out because I said there was nothing wrong with me going out with other guys since we weren’t dating (just like it’s 100% okay for him to go out with other girls). On the phone, he told me he was starting to hate me. Then, he called me a “cold-hearted mother fucker”. The moment he told me that, I immediately hung up and he was blocked. Ten minutes later, he starts knocking on my apartment’s window and doors. I called the police and they told him to leave. I’m now going to file a restraining order. I feel bad, in a way, because he was desperate and I feel like I led him on to a certain extent. I know I haven’t had a great character through all of this. He has gone out of his to buy me things and to always say sweet things, but I didn’t want a relationship with him anymore. He had no business showing up at my place tonight, let alone calling me those horrible names. Guys, am I in the wrong here? He does have a good heart and I do feel cold to a certain extent. I don’t know what to do. I’m so lost
I had to get a restraining order from an ex?
Post Opinion