You say your error doesn't happen as often if you are plugged into
your computer? Is that what you mean by VM? If so, that's likely
because you're developing your code at the time and every time you run
it on the device it kills and restarts your process.. leaving little
time for memory leaks to lead to OutOfMemory errors. Just FYI.

As for your OutOfMemory errors, this can be a really tough one to
debug.. Your app is leaking memory somewhere, but its hard to say
where. The image is not necessarily the problem, it could simply be
the tipping point that finally forces your app to crash. I would
recommend reading over all the articles tagged "Optimization" over at
http://android-developers.blogspot.com

-Nick




On Apr 18, 8:59 am, Streets Of Boston <[email protected]> wrote:
> How big, in pixels, is the image?
>
> On Apr 18, 5:50 am, Kofa <[email protected]> wrote:
>
> > I really don't know why it's giving me this error...
> > I load an ImageView with an image of 692kb .jpg, using scroll options,
> > so you can scroll it around... the strange it's that when the mobile
> > it's connected to the VM it's less possible to happen.
> > So...how can I prevent this? is there anyway that I can free memory
> > when starting the app? can I tell the system to free memory before
> > loading the image? please show me the path =P....thx a lot!
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group 
> > athttp://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to