Binding to list causes memory leak
问题 When I bind an ItemsSource of a ListBox to a List the binding engine holds on to the list elements after the control is gone. This causes all the list elements to stay in memory. The problem goes away when using an ObservalbleCollection. Why does this happen? The xaml inside the window tag <Grid> <StackPanel> <ContentControl Name="ContentControl"> <ListBox ItemsSource="{Binding List, Mode=TwoWay}" DisplayMemberPath="Name"/> </ContentControl> <Button Click="Button_Click">GC</Button> <