L
lstipakov
The following code
<html>
<head>
<title>Untitled Page</title>
<script type="text/javascript" src="../dojo-release-1.0.1/dojo/
dojo.js.uncompressed.js"
djConfig="parseOnLoad: true, isDebug: true, usePlainJson:
true"></script>
<script type="text/javascript">
var version = 1;
function onLoad()
{
setInterval(onTimer, 500)
}
function onTimer()
{
dojo.byId("img1").src = "../gettile.ashx?x=2&y=2&version="
+ version;
++ version;
}
dojo.addOnLoad(function() {debugger;onLoad();});
</script>
</head>
<body>
<img id="img1" src="../gettile.ashx?x=2&y=2&version=2" />
</body>
</html>
generates memory leak, about 1Mb per 6 secs in FF.
What I do wrong? Maybe it is not good to change img.src before prev
image has not been loaded yet? Or something else.
Thanks!
<html>
<head>
<title>Untitled Page</title>
<script type="text/javascript" src="../dojo-release-1.0.1/dojo/
dojo.js.uncompressed.js"
djConfig="parseOnLoad: true, isDebug: true, usePlainJson:
true"></script>
<script type="text/javascript">
var version = 1;
function onLoad()
{
setInterval(onTimer, 500)
}
function onTimer()
{
dojo.byId("img1").src = "../gettile.ashx?x=2&y=2&version="
+ version;
++ version;
}
dojo.addOnLoad(function() {debugger;onLoad();});
</script>
</head>
<body>
<img id="img1" src="../gettile.ashx?x=2&y=2&version=2" />
</body>
</html>
generates memory leak, about 1Mb per 6 secs in FF.
What I do wrong? Maybe it is not good to change img.src before prev
image has not been loaded yet? Or something else.
Thanks!