| Author |
java.lang.OutOfMemoryError
|
alimadhi
Greenhorn
Joined: Jun 12, 2002
Posts: 4
|
|
I have this error only in PALM OS device emulator Can somebody help me how to solve this problem? Ferdinand
|
 |
a sanjuan
Ranch Hand
Joined: Jun 12, 2002
Posts: 164
|
|
your app is consuming too much memory, i'll say. there are tons of articles on the web on how to optimize J2ME and midlets so as to conserve resources. remember that these are small devices with constrained resources. NOTE: you can usually change the heap size of the emulator to accomodate apps with more intensive requirements.
|
 |
alimadhi
Greenhorn
Joined: Jun 12, 2002
Posts: 4
|
|
Thank you, I solved it. I changed String to StringBuffer and everything it's OK Greetings Ferdinand
|
 |
a sanjuan
Ranch Hand
Joined: Jun 12, 2002
Posts: 164
|
|
yep, that's one of the first things to optimize, immutable objects like strings. i've also tried to "reuse" stringbuffers: StringBuffer x=new StringBuffer(); x.append("xxx"); .. .. .. // set length to 0 again and create new string after x.setLength(0) x.append("yyy");
|
 |
 |
|
|
subject: java.lang.OutOfMemoryError
|
|
|