Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Memory leak in the once()/off(). Event not unbound #3001
Describe the bug
Memory leak happens when event bound with once() and then unbound with off(). Event handler will not unbound.
Run the kitchen-sink and watch for the memory allocations in the Chrome devtools. When open and close the "Photobrowser" component several times you will see multiple objects which have pointers to 'swipeBackMove'.
Event handler unbound and removed
I seen this in the framework7-3.6.6/packages/core/js/framework7.js (line 6792)
Event bound with
It happens because .once() create a wrapper function which bound with .on() and when