Here is what I commented out and didn't see the OutOfMemory error
again:

Cursor cursor = getCursor();
ImageView displayImage = (ImageView) findViewById(R.id.belongsImage);
    try {
      if (cursor.moveToFirst()) {
Line 1: String imageUri = cursor.getString(0);
Line 2: displayImage.setImageURI(Uri.parse(imageUri));
      }
   } catch ....

When I comment out Line 2 i don't get the error again.  Of course this
is bad for my application but I just wanted to point out that it isn't
a memory leak by something in the application other than the
displayImage... or at least it seems that way... any ideas?

On Dec 1, 11:29 am, Noam  Wolf <[EMAIL PROTECTED]> wrote:
> I'm not explicitly passing context around at all but I am using a
> ContentProvider which calls getContext()... is that something I should
> be handling too?
>
> On Dec 1, 1:23 am, Romain Guy <[EMAIL PROTECTED]> wrote:
>
> > > Always delete references to Context or
> > > anything that you passed the context to on clean-up.  It's a huge one.
>
> > Just to emphasize this: leaking a Context means you will leak *all*
> > the views and *all* the resources attached to these views (bitmaps,
> > text, etc.)
>
> > --
> > 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to