title: Will this ChildWindow be collected by GC?
body: <p>Recently I have been using anonymous method a lot, so I wonder if I do like:</p>
  
  <p>Say in my MainWindow class, I have:</p>
  
  <pre><code>ChildWindow myChildWindow = new ChildWindow();
  myChildWindow.Closing+= (o, e) =&gt; {
   //DoSomething
   rootGrid.Children.Remove(o as ChildWindow);
  }
  this.rootGrid.Children.Add(myChildWindow );
  myChildWindow.Show();
  </code></pre>
  
  <p>In this case I won't be able to remove the event handler from <code>.Closing</code> since is defined with anonymous method.</p>
  
  <p>Will this ChildWindow still be collected by GC?</p>