Motorola and out of memory exception

Hi All!

Often on Motorola devices i get a message with out of memory exception and application crashes.

Is there a way to catch this kind of exception inside of a java machine?

[195 byte] By [Andrey_Hohutkina] at [2007-11-27 10:49:32]
# 1

what are you doing to cause memory exception?

the important stuff is not to catch the exception but to know why this exception is thrown...

if you know that, you could try to write a better algorithm :-)

suparenoa at 2007-7-29 11:19:53 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2

I know why I get exception - I load many images.

But I indeed must have it preloaded.

When free memory is low i can show alert but first I would like to try load an image anyway.

And instead to go to catch exception clause an application is being crashed.

Andrey_Hohutkina at 2007-7-29 11:19:53 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 3

you may do a something too huge for mobile devices...

suparenoa at 2007-7-29 11:19:53 > top of Java-index,Java Mobility Forums,Java ME Technologies...