Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: getluky on September 23, 2012, 12:44:55 PM
-
Not sure if this is a bug (or perhaps you just know more than me), but although UIScrollBar subscribes to some UIEventListener events in Start(), it doesn't seem to unsubscribe in OnDestroy. I've been trained (by Prime31's plugins) to always balance subscribe/unsubscribe to events to avoid leaking objects between scenes, so I wanted to bring this up and ask if this is omitted intentionally, or is it a bug?
-
It subscribes to the events of child objects. Child objects aren't going to go anywhere. If a scene changes, everything gets removed anyway -- both the child objects, and the script you're concerned about, so this isn't an issue.
-
Ah, that makes sense. Thank you for taking the time to help me understand!