11-21-2011 08:53 AM
Is Memory not released even after closing the application?
I've a smartphone application built with WebWorks (2.2) and after 20 minutes using it, the dreaded 'memory low, close app' warning appears.
The thing is... it is known that browsers generally do a poor job collecting garbage, and we, developers, do an even worse job cleaning up objects.
What is really bad about this is that, when the user meets a memory low condition, the only thing he can do is remove the battery and restart the phone... Closing the app doesn't help (unlike every other OS I know, this doesn't remove the memory resources the app has claimed).
I'd appreciate your comments on this.
11-21-2011 10:25 AM
Hope this helps.
11-21-2011 10:30 AM
Once the memory low warning is received, and my application is closed, the blackberry smartphone changes the app's icon, and every time I attempt to open the application, either it closes right after the splashscreen, or the memory warning is popped again. The only way to revert this situation, is to remove the battery and start the phone.
So, I don't think that all resources are released when the application closes.
Elsewhere, I ready that the BrowserField uses services from other 'process', and when the WW application closes, that memory is not properly released. That's what I'm talking about.
11-21-2011 04:39 PM
What you're describing ashouldn't really be possible with the newest SDK (2.2). Are you using any custom JS extensions?
12-01-2011 06:27 PM
Yes, I'm using custom JS extensions. I don't think they have anything to do with this problem.
The memory low condition is now raised when my application tries to parse a really big XML.
The really bad thing here is that closing the application:
This worries me very much. I must tell my users that they must pull the battery out in order to reset the phone. And this seems to be a very deep architectural issue (perhaps with the OS itself).
Please let me know if my assumptions are wrong, and if there is any workaround this issue.