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
{{ message }}
This repository has been archived by the owner on Apr 2, 2019. It is now read-only.
I've discovered a memory leak in one of the Backgrid views in our app. The view creates a ClientSideFilter instance at .filter, and that clientSideFilter instance creates its own instance (at .shadowCollection) of the collection we hand it. In our case, we hand it a collection that listens to events on other objects.
We call remove() on our view when we're done with it, which frees the view and the ClientSideFilter instance, but not its .shadowCollection.
I can override remove() on our view to add a call this.filter.shadowCollection.stopListening(), which allows the collection to be dereferenced and fixes the leak.
Is that the right way to do it? It would be ideal if Backgrid's own remove() method would take care of that. Or is there some other API for deactivating/destroying a ClientSideFilter instance?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I've discovered a memory leak in one of the Backgrid views in our app. The view creates a ClientSideFilter instance at .filter, and that clientSideFilter instance creates its own instance (at .shadowCollection) of the collection we hand it. In our case, we hand it a collection that listens to events on other objects.
We call remove() on our view when we're done with it, which frees the view and the ClientSideFilter instance, but not its .shadowCollection.
I can override remove() on our view to add a call this.filter.shadowCollection.stopListening(), which allows the collection to be dereferenced and fixes the leak.
Is that the right way to do it? It would be ideal if Backgrid's own remove() method would take care of that. Or is there some other API for deactivating/destroying a ClientSideFilter instance?
The text was updated successfully, but these errors were encountered: