01-21-2009 06:01 AM
sometimes my application throws "out of memory exception". It may be because of improper handling of threads or data.
So please tell me what makes an application to throw this exception ?
And from where can i get the cpu usage and memory information on blacberry device or simulator ?
thanks and regards
01-21-2009 06:22 AM
Take a look at classes
MemoryStats gives information about the free and allocated memory.
EventLogger helps to log events to device log.
To open device log (works also on simulator) - hold Alt key and click LGLG on the device keyboard
01-21-2009 07:49 AM
Apparently if you catch Throwable or Error you can keep running and take some
steps to figure it out. Presumably you will find either a request for a big block do to a size
calculation error or a loop that creates lots of small stuff with dangling references. In either case,
it apparently is not JVM specific.
IIRC, in the past on other computers, I have found this is not always a literal memory problem and could be thrown
due to depletion of other resources.