Memory Management

I am developing some pages (with Enterprise License) that will serve as “hubs” for some business processing. A primary page with a layout control provides a navigation control (accordion) on the left and a pane on the right for the contents to display when you click in the navigation accordion. The pages that appears in the right pane are loaded as urls and also use grids and tabs to show different ajax-provided data within a page.

After I have been testing for awhile going between pages I use up all memory. I was using iframes but switched to iframe. That helped some but I’m still eating huge chunks of memory with each new page that loads. Can you tell me what things I need to do to reduce/eliminate the leaking of memory? I’m concerned that I won’t be able to utilize this “hub” concept because of memory usage, and this was a major reason we licensed the controls.


JavaScript is a language with automatic garbage collection, there is no way to control memory usage from the script itself.
IE has known issue with AJAX data loading ( the component used for data loading not free memory until page reloaded ) which can’t be fixed at all.

In case of iframe based data loading, the default way can be slightly changed to not-recreate iframes for each new loading, which may decrease memory requirements.

You say that “the default way can be slightly changed to not-recreate iframes for each new loading”.  Does this involve a change to your standard script or is there a setting I can use to try this?


When you first time attach url layout create a link to iframe into which this url is loading
This iframe can be accessed through dhxLayout.cells(“a”)._frame
Now you can manipulate directly with frame skipping dhxLayout.cells(“a”).attachURL();

I am still not sure what you mean by “create a link to iframe” and then “manipulate directly with frame skipping dhxLayout.cells(“a”).attachURL();”  I’m interested in minimizing memory leaks but don’t understand your suggestion.


For example:

function attachURL(url) {
    if (!dhxLayout.cells(“a”)._frame) {
    } else {
        dhxLayout.cells(“a”)._frame.src = url;