title: Can .NET Task instances go out of scope during run?
body: <p>If I have the following block of code in a method (using .NET 4 and the Task Parallel Library):</p>
  
  <pre><code>var task = new Task(() =&gt; DoSomethingLongRunning());
  task.Start();
  </code></pre>
  
  <p>and the method returns, will that task go out of scope and be garbage collected, or will it run to completion?  I haven't noticed any issues with GCing, but want to make sure I'm not setting myself up for a race condition with the GC.</p>