This is a migrated thread and some comments may be shown as answers.

Loading Grids through ajax causes memory leak?

1 Answer 114 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jaap
Top achievements
Rank 2
Jaap asked on 01 Feb 2012, 11:06 AM
Hello,

I have an application which has in fact one html page and loads content through ajax calls. The returned content can contain a grid.
That works all just fine. But what I notice is that the grid creates forms for the filter dialogs in the DOM direct inside the BODY tag. While I change the content of my "content div" the grid is remove from the DOM, but the filter forms are left in the BODY tag forever. So the content of the BODY is accumulating during the browser session.
I think the widgets should create ALL DOM elements inside the element you are using to build the widget. That way everything would be cleaned up when swapping content.

Regards, Jaap

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 02 Feb 2012, 02:14 PM
Hello Jaap,

Popup containers are normally placed at the end of the body element, because this is the only way to ensure that they will actually be on top of everything else and not sink inside some lower stacking context.

If you manually change some content on your page, including the Grid, you will need to clean up the filter menus as well.

In the future, we may implement a dispose method for the Grid, so that when you call it, the Grid will know what to look for on the page and what to clean, before you remove it from the DOM.

Regards,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Jaap
Top achievements
Rank 2
Answers by
Dimo
Telerik team
Share this question
or