At the heart of:
- Activity - recreates (onCreate-onDestroy) with every change of orientation.
- The view consists of a ViewFlipper with two children: a simple RelativeLayout and a ListView
- ListView strings have complex layout and related tags
The problem is that I have a memory leak with every orientation change - the activity remains in memory with the whole layout of the view. The activity itself is a context, so it will remain in memory until related objects are connected. So now I am trying to find out why leaks occur.
View has a setTag () method. I use it to store some string information (so each row (View) in the ListView has associated tags).
But how do views and GCs work with tags? My tag objects (holders) contain links to the views, but if view removes the link to it, then these links (with the tag itself) will be easily assembled.
Has anyone encountered similar issues with ListViews?
PS I wonder how GC clears layouts - tons of circular links, contexts, holders, etc.
source share