Loading Grids through ajax causes memory leak?

2 posts, 0 answers
  1. Jaap
    Jaap avatar
    96 posts
    Member since:
    Oct 2012

    Posted 01 Feb 2012 Link to this post


    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
  2. Dimo
    Dimo avatar
    8403 posts

    Posted 02 Feb 2012 Link to this post

    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.

    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top