Are you running the app in the debugger?

30.03.2011 21:28, ivan пишет:
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!


--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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