Memory Leak Problems?

Yes, memory leaks are possible in any software.
In the case of Unity (or rather, C#), events can potentially cause memory leaks.

Whenever subscribing to an event (using +=), always be sure to unsubscribe from it at some point (using -=), otherwise it will remain in memory even if you destroy the object containing the subscription.

Unity has a custom UnityEvent class that works the same way and should be treated the same way.

See these other resources for more info:

1 Like