mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 23:13:25 +00:00
We create a circular reference between handler functions and our wrappers for them so that we can pass the wrapper to jQuery.off when users pass the original handler to us. This reference-counting system can't break all the circular references we create because users can unbind event handlers without explicitly naming the handlers they want to remove (they can remove all bindings on an element, for example). For now, we hope that this memory leak isn't too bad. (imported from commit 9615b5761b4b09ca7ca52c0d847e9b83330373fa)
8.9 KiB
8.9 KiB