Is it necessary to unbind events before destroying an actor
I have some custom events bound in an AIController, and I was wondering if it is necessary to unbind those events before calling DestroyActor in order for it to be garbage collected. If it is not necessary, do the events unbind immediately, or only when the controller is garbage collected?
Editing for clarification: - Do event bindings prevent garbage collection - If not, do they get removed when the actor is flagged for collection, or upon being collected
Yes it is recommended to unbind events when you no longer need them, they can be fired unpredictably and cause bugs very hard to track down.
answered Jun 08 '17 at 08:28 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here