Comment everything out. Make a routine where you rotate and go in and out of the activity. Start activity fresh, do hprof dump, do the routine, get another dump. Click Histogram and click the right most icon to compare to the fresh dump. You may spot some extra objects. Click Histogram again and search for the extra objects. Right-click and look for the "ignore phantom/weak/soft references" (not at computer, don't remember exact menu). You may find orphaned objects e.g. Matrix as a result of doing m = new Matrix() when you can reuse with m.reset(). Aim for zero gain before uncommenting blocks of code to find the leak(s).
On May 14, 12:38 am, olivier <[email protected]> wrote: Comcommentment > Dears, > > I am metting an OutOfMemory exception after a while, while inflating > an XML View with a bitmap. > > The problem occurs after opening many times activities that are using > many bitmap but always inflated from the XML. > > I check with MAT the Memory. > First question : I don't retain any of my Activity in memory - If I > filter on the name of my Activity, i get Objects = 0, but on some > activities I could see RetainedHeap >= 302. Does this indicate a > leak ? > > After that, I try to compare my memory in different points of time, to > see the objects that have been created. But I can't find any thing > significant. > > My Question is : If I don't retain activities in memory what could be > the leak reasons ? > What tools/Method to use to find it ? > > Regards, > > Olivier -- 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

