-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
the current readme makes it appear as if _onTestEvent.Listen = false; is not necessary OnDestroy (it sounds like it is only required if in an OnEnable/OnDisable fashion, so if my gameobject is never disabled and re-enabled it's fine), but it is!
a) Event Bindings need proper unregistration. this should be clear from the readme.
b) API wise, it feels weird to set the listen property to true/false and it's doing magic Register/Unregister behind the scenes. I'd rather have a Register() / Unregister() method exposed. or somethig like a Dispose() method to be called at the end of the lifetime.
The finalizer can't be used - sadly. since the registering of "this" in the EventBus keeps the EventBinding infinetly alive.
Metadata
Metadata
Assignees
Labels
No labels