How to clear heap space of mobile

2 messages - 972 views

Hi,

     I done sample application with kuix. My application flow is like this:

     1) Login screen is there to login,register. For login and registering I am displaying the popup screen.

     2) After login, I am displaying users list which are accesible to particular logged user.

     3) User selected and clicked on login menu, application shows the tabbed window. In that window I am showing the 4 tabs and each tab contains 8 buttons.

     4) On button clicking , I am showing another window to display data or some other buttons

 

My problems are:

1) I am using j2me emulator, application works in emulator but in phone screens are opening very late even taking more than 5 mins

2) In emulator also, If I run application and clicking buttons and doing operations, application become slow and after some time getting "memory out of error". I set the heap space size as 5mb or 10 mb. But still it is getting out of memory error

3) Is there any way to clear the heap or loaded files from kuix to run application fast?

 

Please help me....

 

Regards,

Satya

Sounds like you are doing something wrong. First idea coming to my mind is that you could be always creating a new screen with new data objects, even when going back to a screen previously shown.

The easiest way to find out what's happening is by using the emulator Memory Monitor. You can activate it from the Sun Wireless toolkit preferences in the Monitor section. Then when you fire up the emulator, a graph showing the memory usage of your application is shown in real time. From there it's easy to see what actions take most memory and whether or not the memory is freed in any point of execution.

For more exact help I'd have to see some of your code...