3

I am working on nokia asha s40 using nokia sdk2.0 and lwuit1.5.My problem is that when i use my app for some time it throw an error of out of memory error.so please suggest me how can manage run time memory.when an error comes that time free memory is approximately 3000-4000 bytes which not sufficient for perfrom any operation . So please suggest me how i can prevent this error.it is big issue in my app.

Rajput V.K
  • 63
  • 1
  • 6
  • The big issue is in fact, that you're storing too much objects in your memory. Without any code, we only can guess, where you have a possible memory leak... – bobbel Dec 12 '13 at 12:02
  • Looks like you're leaking memory somewhere, and it's difficult to point exactly where without more details. – Melquiades Dec 12 '13 at 12:03

1 Answers1

0

It throws the error beacuse, you are using resources and not deallocating them. De allocate the resources which you are not using currently, like images and objects.

Example: dealloc(){

logoImg=null; de allocate here myObj=null; }

Hope this might help you.

rohankad
  • 79
  • 7
  • can you tell me that is it userdefined class or default class and is it support in j2me nokia asha development. – Rajput V.K Dec 13 '13 at 09:09
  • It is user defined function, call this method when your game gets completed or you are going for next level. Example:void nextGameLevel() { deallocGame(); } – rohankad Dec 13 '13 at 11:58