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
The listener instance is used as a path marker for Immutable.Map for optimal deletions (i.e. O(1)). Thus, attaching a listener to the same event more than once will only be called at most once.
A fix is as follows:
Create ref counter wrapping the listener function. This tracks how many times the listener has been attached to the same event and same keyPath. If ref wrapper exists, increment the counter.
The listener instance is used as a path marker for
Immutable.Map
for optimal deletions (i.e.O(1)
). Thus, attaching a listener to the same event more than once will only be called at most once.A fix is as follows:
Create ref counter wrapping the listener function. This tracks how many times the listener has been attached to the same event and same keyPath. If ref wrapper exists, increment the counter.
Locate listener, and decrement ref counter. If counter == 0, delete the path from listeners map.
Unwrap ref wrapper and call listener up to N times.
The text was updated successfully, but these errors were encountered: