On Apr 18, 2012, at 4:11 AM, Igor Russkih wrote: > > You're using the Android.Widget.ArrayAdapter(Context, int, IList) > > constructor, which will construct a JavaList to contain the contents of the > > IList, which will result in a gref for each element within the list. If > > these are strings, it should be more efficient to instead use > > ArrayAdapter<string>: > > Why keeping these string grefs inside of M4A framework?
Because we haven't yet optimized every part of the framework. Getting something working has been a priority over making it work well; we'll be improving things as time goes on. > Hm. Why? I've already added each string into the _java_ list. Upon further thought, you're right. My bad. > > Agree, but I can't imagine the model where you need this amount of grefs > > instantly. grefs are just links between java and mono. It's quite easy when you have an Adapter that creates a new View instance for every GetView() invocation, instead of reusing the `convertView` parameter. ;-) (Yes, that's fixable, and you should be reusing the `convertView` anyway for performance reasons...) A more plausible scenario is if you're subclassing a View in C# (e.g. a custom Button or something), and you're displaying lots of these custom types at once. Trying to show thousands at once is likely a bad UI design, but it's not entirely outside the realm of possibility... - Jon _______________________________________________ Monodroid mailing list [email protected] UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
