0

I'm developing a text editor with EditText and ImageSpan. I could managed it but I'm getting memory leaks sometimes: When I insert a new image.

I got a Memory dump with DDMS and open it with MAT. I've seen the images as byte[], but the list of objects with incoming references is empty; so I can't know where the memory leaks are being produced.

Thank you

ligi
  • 39,001
  • 44
  • 144
  • 244
Yurak
  • 1
  • 1
  • possible duplicate of [EditText causing memory leak](http://stackoverflow.com/questions/14069501/edittext-causing-memory-leak) – Maveňツ Oct 13 '14 at 08:20
  • you mean you have leaks not when you insert a new ImageSpan but when you delete it? – pskink Oct 13 '14 at 08:25
  • I've read the other question and I don't think it's the same question because in the MAT screen captures I can see where the memory is retained while in my case I can't get the references to the byte[] that holds the bitmap. – Yurak Oct 14 '14 at 09:23
  • I load text from the disk to the EditText and insert an ImageSpan to represent the image. When I finish the activity (back button) some times the memory held by the bitmap shown in the EditText is not free though I can't see in MAT which objects held a reference to this bitmap. As the images are big (just full screen) in some executions of the activity I got an OutOfMemoryError – Yurak Oct 14 '14 at 09:28

0 Answers0