Sample: dhtmlxGrid Decrease memory usage dhtmlxGrid main page
X

dhtmlxGrid starting from version 1.1 automatically clear used memory on unload method, to prevent memory leaks
in case of "never-reloading" type of app, you can clear memory manually

mygrid=mygrid.destructor();

 
<div id="gridbox" width="100%" height="250px" style="background-color:white;overflow:hidden"></div>
<script>
 
        mygrid = new dhtmlXGridObject('gridbox');
        ...
        mygrid.setHeader("Sales,Book Title,Author,Price,In Store,Shipping,Bestseller,Date of Publication");
        mygrid.setInitWidths("50,150,120,80,80,80,80,200")
        mygrid.setColAlign("right,left,left,right,center,left,center,center")
        mygrid.setColTypes("dyn,ed,ed,price,ch,co,ra,ro");
        mygrid.setColSorting("int,str,str,int,str,str,str,date")
        mygrid.setColumnColor("white,#d5f1ff,#d5f1ff")
        ...
        mygrid.init();
           mygrid.loadXML("grid.xml");
        ...
        //manual grid destruction
        mygrid=mygrid.destructor();
</script>