Github user garrensmith commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/79#issuecomment-57992728
  
    Hi @benkeen, 
    
    Unfortunately this fix isn't quite right. By just clearing the dom and not 
removing the view then `DdocInfo` view is still around and the interval timer 
will still be running. Instead what would be better is to get 
backbone.layoutmanager to remove the view for us. That needs a little plumbing.
    
    You need to create a `removeView` method 
[here](https://github.com/apache/couchdb-fauxton/blob/master/app/core/routeObject.js#L236).
 The method should do this but with some more error checking:
    
        removeView: function (selector) {
          this.views[selector].remove();
          this.views[selector] = null;
        },
    
    Then in `routes-documents`, instead of doing 
`$("#dashboard-lower-content").html("");` we can just do 
`this.removeView('#dashboard-lower-content');` and everything gets nicely 
cleaned up and garbage collected.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to