Ok I just tested the api demo again. I went in and out of List1.java 15 times, and only saw 8 instances still on the heap.
So, clearly "some" are being GC'd. My question still remains... Why doesn't this happen with other views? On Mar 31, 11:50 am, ivan <istas...@gmail.com> wrote: > So to reiterate ... > > I can see every instance of a ListView/ListActivity (ever created) > sitting around in memory, even though I force a GC in every call to > onDestroy(). > ... And this is the expected behavior, because the Dalvik GC will > "eventually" collect them. > > Why isn't this the case with other views? > > On Mar 31, 10:28 am, Mark Murphy <mmur...@commonsware.com> wrote: > > > On Thu, Mar 31, 2011 at 11:58 AM, ivan <istas...@gmail.com> wrote: > > > Incoming references and path to GC root show only the TmpTestActivity. > > > If I am understanding you correctly, then, it is merely a matter of > > them not having been GC'd yet. Bear in mind that the Dalvik GC > > implementation does not try to reclaim all unreferenced objects in a > > single pass. > > > -- > > Mark Murphy (a Commons > > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > > Android Training in NYC:http://marakana.com/training/android/ -- 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