tags:

views:

31

answers:

1

I have developed 2 J2ME games. I have Nokia 6300 & Sony Ericsson w910i for testing the games. Both games work very fine in Sony Ericsson but on the Nokia 6300 throws OutOfMemoryError.
I have 5 screens , New game , Highscore , settings , Help and Exit, which are all GameCanvas subclasses.
In the Menu screen I have shown all these 5 screen names as buttons using TileLayer.
I have run my game in a Thread. When I quit the game I display the Menu screen. There it shows OutOfMemoryError .

Please can anyone help me remove the errors from the game?

+1  A: 

In the world of J2ME, phones are different and JVM implementations are different and so do memory capacities different. Your games must be consuming memory more than Nokia 6300 can handle. Try to reduce memory consumption, do not instantiate classes you do not need at time to time. I'm sure if your game give OutOfMemoryException in Nokia 6300, it'll give the same error in most phones except W910i and smartphones with better memory capacities. But truest me, Nokia 6300 is an average phone in terms of J2ME capability and it means your game doesn't work on average phones.

VOX