DataTables / Responsive

Responsive extension for DataTables, providing support for complex tables on all device screen sizes
Other
148 stars 86 forks source link

Potential Memory leak caused by Responsive Plugin #82

Closed pavanpodila closed 8 years ago

pavanpodila commented 8 years ago

The responsive plugin uses the destroy.dtr event string to subscribe to destroy events fired by the DataTable. However the DataTable is firing it under the destroy.dt namespace. Note the .dt instead of .dtr. This has resulted in memory leaks in my app as the destroy handler in the Responsive plugin never gets called.

Relevant code from the plugin: https://github.com/DataTables/Responsive/blob/master/js/dataTables.responsive.js#L179-L191

DataTables commented 8 years ago

The DataTables on method will automatically at the .dt event namespace if it isn't present. For example: http://live.datatables.net/risewuti/1/edit .

So it sounds like there is something else happening here. I've just tested Responsive and its event handler does get called.

Can you link to a page showing the error please.

pavanpodila commented 8 years ago

Thanks for the quick response. It is good to know that the events are getting called. However when I put a breakpoint in datatables.responsive code , it never gets hit.

DataTables commented 8 years ago

Can you link to a page showing the issue please.

DataTables commented 8 years ago

Going to close this issue as I've not been able to reproduce it and haven't had a test case showing the issue. If it is still causing issues, please reopen with a test case.

lucasA-remora commented 7 years ago

I have run into the same issue where destroy never gets hit within the responsive code, and then the responsive leaks after I switch views and load in a new datatable that is also using the responsive plugin. I can't exactly post a link to the project I am working on, but I will try to replicate this issue in an example project.

DataTables commented 7 years ago

That would be great, yes please. I would need a page showing the issue to be able to debug it.