I’m making a shooter and each enemy has a Died event, and I want my game manager to find out when the enemy count is 0 by updating every time one dies. When enemies die, they are destroyed. I’m wondering if I will need to disconnect the update function when this happens.
For cleanliness purposes, YES.
Also, it’s the event handler that stores the subscribers, so if you don’t there will be a strong link left inside your objects and they will not be collected by the garbage collector. They will then remain in the memory till the application is closed.