We have a number of classes where we can set an Adapter and there is an inconsistency between whether or not the previous adapter is 'cleared' or not. For instance in MvxRecyclerView at the end of Adapter's set property we do:
if (existing != null)
{
existing.ItemsSource = null;
}
However in other classes (ex MvxAppCompatRadioGroup) we do not set the ItemsSource to null. I'm inclined to think that we should clear out the old adapter since class instances don't typically share adapters.
@martijn00 @Cheesebaron
We have a number of classes where we can set an
Adapter
and there is an inconsistency between whether or not the previous adapter is 'cleared' or not. For instance inMvxRecyclerView
at the end of Adapter's set property we do:However in other classes (ex
MvxAppCompatRadioGroup
) we do not set theItemsSource
tonull
. I'm inclined to think that we should clear out the old adapter since class instances don't typically share adapters.