Browse Source

Fix repeater holding onto elements

If a consumer changes the ItemsSource with a non recycling layout then the items from the old source would be perpetually held by repeater, a potentially substantial leak.

Ported from e158eec3e9
pull/3424/head
Steven Kirk 6 years ago
parent
commit
09297dbb08
  1. 2
      src/Avalonia.Controls/Repeater/ItemsRepeater.cs

2
src/Avalonia.Controls/Repeater/ItemsRepeater.cs

@ -588,6 +588,8 @@ namespace Avalonia.Controls
ClearElementImpl(element);
}
}
Children.Clear();
}
InvalidateMeasure();

Loading…
Cancel
Save