诸位 Nokia 内存问题
发表新主题 回复此主题
第1楼 2006-04-29 20:02 driftboat 写道:
诸位 Nokia 内存问题
while(true){
// System.gc();
Image img2 = null;
while(img2 == null){
try {
System.out.println(Runtime.getRuntime().freeMemory());
img2 = Image.createImage("/0.png");
count++;
}
catch (IOException ex) {
System.out.println("cant load" + count);
}
catch (Error e) {
System.out.println("this is error");
}
}
}
不知道大家有没有试过,在NOkia白色模拟器上载入一段时间后会出io错误
第2楼 2013-08-31 12:44 Robot :
诸位 Nokia 内存问题 相关
第3楼 2006-04-30 11:47 driftboat 写道:
为什么,没人知晓呢,真的是io错误吗?如果是176*208的图最后count 为390
如果在这段代码前面加一句 Image im = Image.createImage(176,208);
count 为389 再加一句 Image im1 = Image.createImage(176,208); count 为388
我看还是内存问题!
第4楼 2006-05-01 17:37 zjstu 写道:
这问题一直都有,解决办法:一次加载
第5楼 2006-05-10 23:27 cfanray 写道:
完全看不懂啊,所以帮不到楼主了,惭愧ing