How to destroy the datatables(structure and rowData) completely?
How to destroy the datatables(structure and rowData) completely?
Hi all,
im using the latest version of datatables to display my ajax result. I want to know a method as to how to delete the datatable completely(datatable and the data) so that it frees up the memory contained by the browser. I use a chrome browser and i observe memory accumulation on every re-draw of datatables.I have also set the cache to false. any help will be appreciated.
Regards,
Nikki
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Use
destroy(). The optional parameter can be passed in to also remove the table from the DOM.Allan
Hi allan,
Well the destroy method works fine and i pass the remove parameter to it which is set to "true" so that it remove the DOM elements as well, but i dont see any difference in the memory consumption when i check it in my task manager. It actually sees an increase rather than a decrease.
Nikki
Hi Nikki,
Can you l ink to the page in question so I can debug it please? I'm not seeing such a leak in Chrome myself - once the GC has run.
Allan