Event listeners question - do they stick around forever?

If a script that makes an event listener gets destroyed will the event listener get destroyed automatically or do we manually have to account for each of these?

What about abilities on equipment or weapons? If a weapon gives an ability and then the player equips a different weapon, removing and deleting the previous weapon, what happens to things like castEvent, executeEvent, recoveryEvent etc. that were on the first weapon?

Like these:



.. or is that only when it is stored in a variable like

myEventListener = player.myEvent:Connect(OnSomethingHappened) ?

Someone with more knowledge about this might address your main question.

But in my case, I initialize all those event listeners inside a table. Then when the Weapon is Unequipped or Destroyed, I iterate through that table and disconnect every connected event.
I have seen this approach in some Core-made Scripts. So it might be the way to go.