HI,
In my game i have different classes which extends GameCanves for different screens( Help, About Us, Game ect). I move from screen to screen by making an object of that class and by setting it to the current display. This works well in sony ericsson phones and some Nokia phones like N 73, N 70 ect. But in Nokia 6300 , 6280 (s 40 series) it gives out of memory exception when I make an additional object.
ex- for main menu and game i call these methods in the main Midlet
MainMenu mm;
Game game;
showMainMenu() {
if(mm == null) {
mm = new MainMenu();
}
setCurrentDisplay(mm);
}
showGame() {
if(game == null) {
game = new MainMenu();
}
setCurrentDisplay(game);
}
when i call showGame() after calling showMainMenu() it gives out of memory exception.
Thanks,
Hashani
