Justin, with the BitmapFactory.Options way, I'm getting this problem
even when not changing orientation a single time.

It's known that the Gallery leaks, I demonstrated that to Romain in a
different post, so I know that my bitmaps will never be deleted
(presumably), but Romain suggested using BitmapFactory.Options to
reduce the amount of leaked memory (and to reduce the app's memory
hunger in general, regardless of any leaks). However, the downsizing
of the bitmap didn't help at all.

On Dec 12, 9:47 am, "Justin (Google Employee)" <j...@google.com>
wrote:
> Mike,
>
> Something in your original post (which I hadn't previously read) might
> be a clue. You said that this often happens after orientation changes.
> Orientation changes must be accelerating whatever memory leak you have
> because they cause your activity to be shutdown and restarted. Make
> sure in your onPause code you're doing any necessary cleanup and
> double check anything you might be doing with static members.
>
> Cheers,
> Justin
> Android Team @ Google
>
> On Dec 11, 3:03 pm, EboMike <ebom...@gmail.com> wrote:
>
> > I tried using BitmapFactory.Options when calling
> > BitmapFactory.decodePath() on Romain's recommendation to resize the
> > 1024x768 JPG files down to 480x320 before displaying them in a
> > Gallery, but that didn't help at all - if anything, it made things
> > worse. The app still runs out after viewing just a few images.
>
> > -Mike
>
> > On Dec 11, 10:38 am, "Justin (Google Employee)" <j...@google.com>
> > wrote:
>
> > > Are you scaling the image down when you display it? Look at the longer
> > > form of BitmapFactory.decodeByteArray. The BitmapFactory.Options
> > > argument has parameters for down sampling the image on load.
>
> > > Cheers,
> > > Justin
> > > Android Team @ Google
>
> > > On Dec 11, 10:10 am, fala70 <fal...@gmail.com> wrote:
>
> > > > my application open in sequence 3 activities, on last I've this
> > > > situation heap:
> > > > ID     Heap Size Allocated   Free         Used         Objs.
> > > > 1       2,945 MB        1,936 MB        1,009 MB        65,75%  38.365
>
> > > > at any case I've a problem that I can't solve againg after much time
> > > > that I am on. I need to show a list, grid or gallery of a few photo
> > > > selected from user from internal or external memory. For that I used:
>
> > > >             Uri target = Media.INTERNAL_CONTENT_URI;
> > > >             Intent intent = new Intent(Intent.ACTION_PICK, target);
> > > >             startActivityForResult(intent, GET_IMAGE_FROM_FOLDER);
>
> > > > and that work good. Then I know the picture id and if it is in
> > > > internal or external media.. Now I need to show the thumbnail of these
> > > > picture selected but that is impossible I can't do it for too much
> > > > memory request. All picture are taked from camera.
>
> > > > is there a solution for resize the images without goi out of memory ?
>
> > > > On 11 Dic, 13:51, Romain Guy <romain...@google.com> wrote:
>
> > > > > It works when you load a smaller file because you simply have very
> > > > > little amount of memory left. Your application is using too much
> > > > > memory, you need to trim it down.
>
> > > > > On Thu, Dec 11, 2008 at 1:00 AM,fala70<fal...@gmail.com> wrote:
>
> > > > > > I 've a similar problem. I am going crazy from several days.... Is
> > > > > > impossible to show images from internal or external memory captured
> > > > > > from camera. Also I tried to read a file jpg of 700KB and use
> > > > > > BitmapFactory.decodeByteArray to get the bitmap, but I receive that
> > > > > > exeption:
>
> > > > > > 12-11 00:50:27.819: ERROR/dalvikvm-heap(3547): 6291456-byte external
> > > > > > allocation too large for this process.
>
> > > > > > if I try to load an image smaller (around 4K)
> > > > > > BitmapFactory.decodeByteArray work good.
>
> > > > > > somebody has a solution ?
>
> > > > > --
> > > > > Romain Guywww.curious-creature.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to