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
I'm using the affix plugin in a single page application. When I remove the affixed content from the dom I call $(window).off('.affix') to avoid a memory leak.
A documented "destroy" method would help users of the affix plugin to avoid memory leaks. In the docs it might be helpful to call out the memory leak pitfall- "if you're using the affix plugin in a single page application be sure to destroy it when you remove the affixed content" or something.
Activity
fat commentedon May 22, 2014
yeah… might be worth adding teardown functions to all plugins
fat commentedon May 22, 2014
i also updated that question with a much better answer… that person didn't really want a destroy method
[-]add destroy method to affix[/-][+]add destroy method to all plugins[/+]mdo commentedon Aug 2, 2014
Punting to the v4 checklist.
jdanyow commentedon Sep 4, 2014
I'm using the affix plugin in a single page application. When I remove the affixed content from the dom I call $(window).off('.affix') to avoid a memory leak.
A documented "destroy" method would help users of the affix plugin to avoid memory leaks. In the docs it might be helpful to call out the memory leak pitfall- "if you're using the affix plugin in a single page application be sure to destroy it when you remove the affixed content" or something.
Any chance this issue can be re-opened?
My stackoverflow post:
http://stackoverflow.com/questions/21713468/bootstrap-affix-plugin-memory-leak/
infacq commentedon Sep 30, 2014
1+
cvrebert commentedon Apr 23, 2015
X-Ref: #6315, #7166