OnOrientationChanged leaks in ListView

by Alok Kulkarni » Wed, 16 Jun 2010 20:18:07 GMT

Sponsored Links
I am having a ListView with custom ArrayAdapter.For defining a list item i
have my own class ListItem which stores all info including list item images,
and other textual info in it.
I have handled orientation change in onRetainNonConfigurationInstance() in
which i save the array of ListItems in another object.. and when the
Activity is recreated i reassign the array of list items to those of the
activity. Then i create an ArrayAdapter accordingly .I use adb shell
procrank and find out that i am leaking memory everytime i change
orientation. I have debugged through and found out that the leak is in
arraylist of list items itself.What wrong am i doing here ?
Thanks ,


Other Threads

1. Widgets changes with 1.6?

I'm developing a Widget that updates every 10 seconds
On the 1.5 emulator, as well as on my adp1, it works as expected.
On the 1.6 emulator, my widgets are not updated. Apparently,
AppWidgetProvider.onUpdate(...) is never called.

Is there something I missed?

Thanks a lot,


2. Android desktop and Application.


I want to reduce the application size but not the Desktop size. I
tried changing code in AndroidActivityManager.java but it changes the
size of desktop as well.

Is there a way to distinguish between them?


unsubscribe: android-porting+unsubscr...@googlegroups.com

3. Emulator crashed on X86_64 Gentoo (SDK 1.6)

4. SurfaceView in Layout XML

5. Error occurs when layoutopt is run.

6. AVD emulator problem in Android SDK 2.0

7. SDK installation on Windows - Failed To Fetch URL...