Is it considered acceptable to not call Dispose() on a TPL Task object?
问题 I want to trigger a task to run on a background thread. I don't want to wait on the tasks completion. In .net 3.5 I would have done this: ThreadPool.QueueUserWorkItem(d => { DoSomething(); }); In .net 4 the TPL is the suggested way. The common pattern I have seen recommended is: Task.Factory.StartNew(() => { DoSomething(); }); However, the StartNew() method returns a Task object which implements IDisposable . This seems to be overlooked by people who recommend this pattern. The MSDN