Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
385
Memory Leak when using grid with features
posted

Hi,

we are using your grid in our application to display different kind of data. Now we found out that there seems to be a huge memory leak in the grid. Everytime the grid gets refreshed, memory is leaked. It seems that it depends on the features that are used. I'll post my code to show you my test-environment:

$('#grid').igGrid({

columns: [{ headerText: "Product ID", key: "ProductID", dataType: "number", width: "100%" }, ],
height: 400,
width: 300,
dataSource: [],
rowVirtualization: true,
columnVirtualization: false,
virtualizationMode: 'fixed',
features: [{ name: 'Filtering' }, { name: 'Updating' }, { name: 'Selection' }, { name: 'Sorting' }],
primaryKey: 'ProductID',
renderCheckboxes: true,
autoGenerateColumns: false,
avgRowHeight: 50,
showHeader: true,
});

I also added a button to set the data source a few times. This is the code to do so:

for (var i = 0; i < 50; i++) {
$('#grid').igGrid('option', 'dataSource', []);
}

Taking a look with IE 11 memory-analyzer shows that everytime the button is clicked, 250 KB are leaked. Using more of the grids features massively increases the amount. And the data is just an empty array.

It was intended to refresh the grid quite often, like every few seconds or so, but that's now a huge problem.

Are there any mistakes i made like setting the data the wrong way or anything else?

I'm using the latest version (14.1.20141.1020).

Kind regards

Lorenz Hrobarsch

Parents Reply Children
No Data