How to prevent memory leak when using Jquery - datatables (ie7)?
How to prevent memory leak when using Jquery - datatables (ie7)?
bbarani
Posts: 32Questions: 0Answers: 0
I am using datatables in my Javascript application but when rendering the DOM, memory of IE grows up like anything. Memory doesn't come down even after clearing the datatatables element from DOM.
I have multiple tabs and i remove the LI part of the DOM to remove the tab which host the datatable.
If I dont render the DOM via datatables, the utilized memory is very less..
[code]
var functionLoad=(function (datasource){
var oTable = $("#" + elementId).dataTable({})
});[/code]
Can someone let me know the best way to prevent memory leaks when using IE7?
Is there a way to remove reference of table element?
I have multiple tabs and i remove the LI part of the DOM to remove the tab which host the datatable.
If I dont render the DOM via datatables, the utilized memory is very less..
[code]
var functionLoad=(function (datasource){
var oTable = $("#" + elementId).dataTable({})
});[/code]
Can someone let me know the best way to prevent memory leaks when using IE7?
Is there a way to remove reference of table element?
This discussion has been closed.
Replies
Are you clearing them with fnDestroy? I'm not aware of any leaks at this time, so I'd need a test case showing the issue please.
Allan
I have created a test case below....
http://live.datatables.net/uhojoh/11
Please click load data table to load the data table and note the memory consumption.. Click Destroy data table to remove the table.. The memory will still remain even after destroying the data table and removing the element from DOM..
I have uploaded memory consumption in the below site for your reference,
http://postimage.org/image/o8dfwjvqx/
This issue comes up only when the column data has hyperlink in it.
The below link has the same data except that the column data doesn't contain any hyperlink in them and there's no issue of memory leak here...
http://live.datatables.net/uhojoh/12
Thanks,
Barani
Allan
Allan
Allan
I am seeing the exact same memory leak on Internet Explorer 9. Please let us know when we have a fix for this.
Thanks
Pratik