Kostya asked if you were running under the debugger.  This is relevant
because previously I too had a memory leak involved with ListViews and
eventually discovered that it only happened if I was running under the
debugger.  So if you are running under the debugger, you might check
it without the debugger running to see if you still have a problem.

On Mar 30, 10:53 am, ivan <istas...@gmail.com> wrote:
> Also, I'm using Android SDK build 8 (2.2).
>
> On Mar 30, 11:37 am, ivan <istas...@gmail.com> wrote:
>
> > In addition, I've read that the leak doesn't occur while the app is
> > running in a non-debug session.  This is not the case with my
> > experiments.  I see the leak regardless.
>
> > On Mar 30, 11:28 am, ivan <istas...@gmail.com> wrote:
>
> > > onDestory has been called every time, which I've tested with a break
> > > point .
>
> > > On Mar 30, 11:23 am, Mark Murphy <mmur...@commonsware.com> wrote:
>
> > > > On Wed, Mar 30, 2011 at 1:18 PM, ivan <istas...@gmail.com> wrote:
> > > > > I accidentally posted that last one before I was done.
>
> > > > > I have read copious posts on this, but no solution.  After using MAT
> > > > > extensively on a simple ApiDemo list view sample, I am ABSOLUTELY
> > > > > convinced that the ListView/ListActivity is leaking memory.  I say
> > > > > this because I can see every instance I've created persisting in
> > > > > memory -- regardless of forcing a garbage collection.  To repeat copy
> > > > > the code below into a project, create another simple Activity and go
> > > > > back and forth between the two a few times.  Then in DDMS force a GC
> > > > > and dump the heap hprof file.  Open the OQL tab in MAT and type the
> > > > > following query "select * from com.<package name>.TmpTestActivity" and
> > > > > run... you'll notice multiple instances of TmpTestActivity in memory.
>
> > > > Has onDestroy() been called on the "multiple instances of
> > > > TmpTestActivity in memory"?
>
> > > > If not, they are not leaked. Android just hasn't kicked them out of
> > > > RAM yet. That is perfectly normal behavior.
>
> > > > --
> > > > Mark Murphy (a Commons 
> > > > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> > > > _The Busy Coder's Guide to *Advanced* Android Development_ Version
> > > > 1.9.2 Available!
>
>

-- 
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