I'm having a strange "memory full" problem..
Strange for two reason:
- only one small image loaded (so is not the classic full memory for too many images)
- on 3650 works fine, but errors occus in 6600
I manage a matrix of short number of 50x50, and there is a recursive funcion that is called about 500 times..
Some could say that this is too much..but why it works on 3650?
I have also tryed putting System.gc() but with no resuls..
I'd wager that it's related to the fact that the phone is MIDP 2.0 and uses more memory because of that. And I'd agree that it is a stack overflow. But there is always the possibility that you have run into a phone-specific bug.
You could try making the recursion less deep and see if it works on the 6600.
many thanks for suggestion..
I've tryed to manage a 11x11 matrix of byte and it works (the recursive procedure is called max 15 times)
But for this type of game is not enought.
With 33x33 there is still the error..
I don't konw..Insted of increasing memory capacity and management, the new mobile are less power..
PS: With the mobile game instruction I should write: attention: this game is only for hight performance mobile..so..If you have a modern mobile you have to get an oldest one in order to play...
Try to convert your recursive method into a non-recursive one, and you should be fine. Recursively calling a method 500 times consumes lots of memory that could be easily avoided by using a non-recursive method.
well, then it would also be slow recursively (probably slower), unless you use a completely different kind of algorithm. so, it looks like you're just trying to do too much, or you're doing it inefficiently. good luck!