Forum
09:57
23/06/2010
I try setInterval(function() { }, 200). And still has memory leak. Chrome occupy 38M memory at the begin. Chrome occupy 600M memory after run this test case for one hour.
IE 8 and Firefox 3.5.5 have the same problem.
The jqGrid version is 3.7.1. The operating system is Windows XP.
<html>
<head>
<script type='text/javascript' src='jquery.jqGrid/js/jquery-1.4.2.min.js'></script>
<link rel="stylesheet" href="jquery/css/smoothness/jquery.ui.all.css" type="text/css" media="screen">
<link rel="stylesheet" href="jquery.jqGrid/css/ui.jqgrid.css" type="text/css" media="screen">
<script type="text/javascript" src="jquery.jqGrid/js/i18n/grid.locale-en.js"></script>
<script type="text/javascript" src="jquery.jqGrid/src/grid.base.js"></script>
<script type="text/javascript" src="jquery.jqGrid/src/grid.common.js"></script>
<script type="text/javascript" src="jquery.jqGrid/src/grid.custom.js"></script>
<script type="text/javascript" src="jquery.jqGrid/src/grid.formedit.js"></script>
<script type="text/javascript" src="jquery.jqGrid/src/grid.inlinedit.js"></script>
<SCRIPT LANGUAGE="JavaScript">
$(document).ready(function(){
setInterval(function() {
$("#table").jqGrid({
datatype:function() {},
height: 250,
width: 300,
colNames:['id', 'name', 'phone'],
colModel:[
{name:'id'},
{name:'name'},
{name:'phone'}
],
rowNum:10
});
$("#table").GridUnload();
}, 200);
});
</SCRIPT>
</head>
<body>
<table id='table' />
</body>
</html>
13:33
Moderators
30/10/2007
Hello,
1. I see datatype as function in your code. This means that you made your own ajax request. Until this request comme to the grid they is already destroyed. That is: the request (data) is in your memory not knowing where to go.
The real test is:
Sorry edit:
In the succes (or complete) event in your ajax request call the GridUnload after a delay.
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
15:50
Moderators
30/10/2007
Hello,
Thanks for the investigation.
If you replace
$(document).mouseup(function (e) {
if(grid.resizing) { grid.dragEnd(); return false;}
return true;
})
with
$(grid.hDiv).mouseup(function (e) {
if(grid.resizing) { grid.dragEnd(); return false;}
return true;
})
Does this happen?
Best Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
11:53
Moderators
30/10/2007
Hello,
Thanks for investigation.
Also windows unload is raised if a refresh button by exmple is clicked, that is this is not seen in your code.
Little confused about this
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
50 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66