I'm trying to understand WPF memory leaks and after reading up on the subject, I have some unclear areas.

Questions are best derived from example, so let's define:

Model:

```
public class Mom : INotifyPropertyChanged
{
   public ObservableCollection<Kid> Kids { get; set; }

   private string name;
   public string Name
   {
       get => name;
       set => Set(ref name, value);
   }

   public event PropertyChangedEventHandler PropertyChanged;

   protected void Set<T>(ref T field, T newValue = default(T), [CallerMemberName] string propertyName = null)
   {
       field = newValue;
       PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
   }
}

```

The ViewModel (DataContext) could look like this:

```
public class MomViewModel, INotifyPropertyChanged
{
   private Mom selected;
   public Mom Selected
   {
       get => selected;
       set => Set(ref selected, value);
   }
}

```

Now I want to ask questions about these 2 binding scenarios in XAML:

First binding:

```
<ListView ItemsSource="{Binding Selected.Kids}">
...
</ListView >

```

Second binding:

```
<TextBlock Text="{Binding Selected.Kids.Count}" />

```

Now imagine that inside the ViewModel, we have a timer that assigns a new Mom every second. That is `Selected = new Mom { .. };`.

Q1:
Would binding 1 produce a memory leak? The property is of type ObservableCollection which implements INotifyPropertyChanged, but the property itself does not (just regular get,set).

Q2:
Would binding 2 produce a memory leak? The binding is directly against `Count` which is from Collection and doesn't implement INotifyPropertyChanged.

Notice that the view (XML) itself is never destroyed - only the "Selected" property is changed every second. It is (also) not clear to me when WPF allows for garbage collection - only when the view is destroyed, or whenever a binding changes. My tests are inconclusive here...

Thanks.