You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EventContainer already tracks events and callbacks added via the container; rather than removing all listeners on remove, it should remove specific callbacks that it manages.
The text was updated successfully, but these errors were encountered:
Current behavior (after removing specific events/handlers):
# Because of function wrappers, the emitter doesn't always directly# hold the _handler function, it sometimes holds something like# 'wrapper(_handler)'. So a call like:# self.bus.remove(_name, _handler)# will not find it, leaving an event handler with that name left behind# waiting to fire if it is ever re-installed and triggered.# Remove all handlers with the given name, regardless of handler.ifremoved:
self.bus.remove_all_listeners(name)
A better implementation would need to keep track of wrapped functions to more precisely remove only the handlers managed by this container
EventContainer
already tracks events and callbacks added via the container; rather than removing all listeners onremove
, it should remove specific callbacks that it manages.The text was updated successfully, but these errors were encountered: