Jon thanks for your fast reply.
Before the crash I see this in the log:
04-06 11:49:28.396 D/dalvikvm( 516): GREF has increased to 701
04-06 11:49:32.178 D/dalvikvm( 516): GREF has increased to 801
04-06 11:49:51.285 D/dalvikvm( 516): GREF has increased to 901
04-06 11:49:55.085 D/dalvikvm( 516): GREF has increased to 1001
04-06 11:50:01.095 D/dalvikvm( 516): GREF has increased to 1101
04-06 11:50:03.576 D/dalvikvm( 516): GREF has increased to 1201
04-06 11:50:06.136 D/dalvikvm( 516): GREF has increased to 1301
04-06 11:50:11.435 D/dalvikvm( 516): GREF has increased to 1401
04-06 11:50:13.975 D/dalvikvm( 516): GREF has increased to 1501
04-06 11:50:41.116 D/dalvikvm( 516): GREF has increased to 1601
04-06 11:50:43.615 D/dalvikvm( 516): GREF has increased to 1701
04-06 11:51:03.535 D/dalvikvm( 516): GREF has increased to 1801
so its elated to the global references.
I have modified one of the views in the TablesAndCellStyles examples. It has
a list with 40 items now.
Each time I scroll down and up the list GREF increases and never goes down
again. The same happens when I open the activity, go back and open it again
several times.
Is there a work around for this?
Scrolling up and down a list should not blow up the memory. Can I release
the references in code?
[Activity(Label = "TwoLineListItem")]
public class TwoLineListItem : ListActivity {
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
var items = new List<Tuple<string, string>>();
for (int i = 0; i < 10; i++)
{
items.Add(new Tuple<string,string>("Fiji", "A nice beach " +
i));
items.Add(new Tuple<string,string>("Beijing", "AKA Shanghai " +
i));
items.Add(new Tuple<string,string>("Seedlings", "Tiny plants " +
i));
items.Add(new Tuple<string,string>("Plants", "Green plants " +
i));
}
ListAdapter = new TwoLineListItem_Adapter(this, items);
}
}
Thanks,
Alex
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/Crash-on-list-scrolling-tp5620102p5622667.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid