You're running into memory fragmentation problems. Bitmap memory is
not allocated from the Java object heap. Instead, it's allocated from
the 'malloc' heap. That's why you don't see the Java heap expanding.

How big is your bitmap? If you're processing JPEG files, probably it
will be better to read the thumbnail directly from the JPEG file. This
way you don't need to create the Bitmap at all.

On Feb 26, 9:47 am, "bra...@gmail.com" <peacoc...@gmail.com> wrote:
> Ok I am at the end of my rope.
>
> I am doing some image processing. I have a large image file which I
> open and create a smaller bitmap from. At the end of processing I call
> recycle on everything. I null everything. I run GC manually.
>
> I then try edit another image and I get an out of VM memory error.
> Bitmap exceeds etc etc.
>
> I am looking at the heap and the secone edit doesnt seem to cause it
> to increase at all.
>
> What else can I do. Surely google cannot possibly be suggesting that
> we can open one large bitmap per session and thats it?
--~--~---------~--~----~------------~-------~--~----~
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