Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add destroy method to all plugins #13655

Closed
cvrebert opened this issue May 22, 2014 · 6 comments
Closed

add destroy method to all plugins #13655

cvrebert opened this issue May 22, 2014 · 6 comments

Comments

@cvrebert
Copy link
Collaborator

[WAS: add destroy method to affix]
See e.g. http://stackoverflow.com/questions/23797241/resetting-changing-the-offset-of-bootstrap-affix

@fat
Copy link
Member

fat commented May 22, 2014

yeah… might be worth adding teardown functions to all plugins

@fat
Copy link
Member

fat commented May 22, 2014

i also updated that question with a much better answer… that person didn't really want a destroy method

@cvrebert cvrebert changed the title add destroy method to affix add destroy method to all plugins Jun 28, 2014
@cvrebert cvrebert added this to the v4.0.0 milestone Jul 8, 2014
@mdo
Copy link
Member

mdo commented Aug 2, 2014

Punting to the v4 checklist.

@mdo mdo closed this as completed Aug 2, 2014
@mdo mdo removed this from the v4.0.0 milestone Aug 2, 2014
@jdanyow
Copy link
Contributor

jdanyow commented 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
Copy link

infacq commented Sep 30, 2014

1+

@twbs twbs locked and limited conversation to collaborators Sep 30, 2014
@cvrebert
Copy link
Collaborator Author

X-Ref: #6315, #7166

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants