Skip to content

add destroy method to all plugins #13655

Closed

Description

@cvrebert

Activity

  1. fat commented on May 22, 2014

    @fat
    Member

    yeah… might be worth adding teardown functions to all plugins

  2. fat commented on May 22, 2014

    @fat
    Member

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

  3. changed the title [-]add destroy method to affix[/-] [+]add destroy method to all plugins[/+] on Jun 28, 2014
  4. added this to the milestone on Jul 8, 2014
  5. mdo commented on Aug 2, 2014

    @mdo
    Member

    Punting to the v4 checklist.

  6. removed this from the milestone on Aug 2, 2014
  7. jdanyow commented on Sep 4, 2014

    @jdanyow
    Contributor

    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/

  8. infacq commented on Sep 30, 2014

    @infacq

    1+

  9. locked and limited conversation to collaborators on Sep 30, 2014
  10. cvrebert commented on Apr 23, 2015

    @cvrebert
    CollaboratorAuthor

    X-Ref: #6315, #7166

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature, or a change to how an existing one worksjsJavaScript or TypeScript sources and plugins

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions