title: Linq Func Memory Leak
body: <p><a href="https://i.stack.imgur.com/80osr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/80osr.png" alt="dotMemory"></a></p>
  
  <p>I have a ViewModel that contains some code to maipulate collections. 
  At first, i was thinking it was related to databinding leaks but it seems unrelated at all.
  All I need to do is add a line of code like:</p>
  
  <p><code>MyTypes.Where(t =&gt; t.IsSelected).OrderBy(t =&gt; t.Item).Select(t =&gt; t.Item))</code></p>
  
  <p>This generates 3 references to the ViewModel and stops it from being collected.</p>
  
  <p>Anyone explain whats happening?</p>