-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
I've noticed that $(context).scroll and $(context).resize are currently staying in memory, carrying with the the whole Context object in memory even after destroy has been called.
Since both are shortcuts to jQuery bind, it's recommended to 'unbind' both on the plugin's destroy call.
https://github.com/imakewebthings/jquery-waypoints/blob/master/waypoints.js#L160
Would it be possible to unbind both of this event handlers in order to avoid memory leaks? This is important due the fact that in a SPA , waypoint handlers are being triggered in other pages after the plugin destroy method have been called and the Context variable is not being picked up by the GC because of these bindings.
Thanks
Metadata
Metadata
Assignees
Labels
No labels