Re: About "Out of memory"
I had also face the same problem in my J2ME S40 app, have solved that problem by calling system.gc() method.
Re: About "Out of memory"
Hi,
Could you share some code? I would help to get started and to find possible fixes.
Br,
Ilkka
Re: About "Out of memory"
Yes, [I]system.gc()[/I] is effective in java, but how can I make the save effect in S40 web apps?
Re: About "Out of memory"
[QUOTE=isalento;852236]Hi,
Could you share some code? I would help to get started and to find possible fixes.
Br,
Ilkka[/QUOTE]
Hi isalento,
My code is bellow, this function handles the response of the http request called by the "next page" button.
function onPhotoList(xmlDoc){
var html = '<div class="tab_mag">';
html += '<table id="m_tab" cellspacing="2" border="0" style="border-collapse:collapse;" summary=""><tr>';
var recSets = xmlDoc.getElementsByTagName("rsp")[0];
for (var i = 0; i < recSets.childNodes.length; i++){
if (i > 0 && i % 3 == 0){
html += '</tr><tr><td style="height:5px" /></tr><tr>';
}
var rec = recSets.childNodes[i];
var obj = new Object();
for (var j = 0; j < rec.childNodes.length; j++){
if (rec.childNodes[j].hasChildNodes()){
obj[rec.childNodes[j].tagName] = rec.childNodes[j].firstChild.nodeValue;
}
};
html += '<td onclick="g_inSearch = false;getPhotoInfo(parseInt(' + obj["id"] + '))" valign="top">';
html += '<div><img src="http://12.34.56.78/images/';
html += obj["img"] + '" alt="' + obj["type"] + '" width="60" height="85" />';
html += '</div><div>' + obj["qishu"] + '</div></td>';
obj = null;
rec = null;
}
html += '</tr></table></div>';
mwl.insertHTML("#channel_list", html);
mwl.switchClass('#views', 'view0', 'view1');
recSets = null;
html = null;
}
Re: About "Out of memory"
Thanks for the code.
I couldn't instantly reproduce the problem with a hacked version of mine.
What device are you using for testing?
How big are images that you try to load?
-Ilkka
Re: About "Out of memory"
Hi isalento,
Our test device is X3-02.
Every image size is 60x85pix, about 5KB.
The error always appears after 20-30 page turning.
I think the problem may be caused by xml parse, or mwl.insertHTML(), right?
Re: About "Out of memory"
Hi,
I discussed with RnD about this issue.
Could you check what Ovi Browser version you are using?
-Ilkka