Home Will a task ever be interrupted by garbage collection if there are no references to it?
 Sanity-check here. Suppose I start a task but I don't await it and I don't store a reference to it. In other words, I just run: async Task PerformLongOperation() { await Task.Delay(10 * 1000); Debug.WriteLine("All done!"); } void DoSomething() { // Kick off the operation and allow it to complete when it does. PerformLongOperation(); }  Clearly, without keeping a reference to the Task returned by PerformLongOperation(), I have no way of knowing if and when it completes. But suppose that that's not necessary in certain instances. Is there any danger of garbage collection noticing the task running with no references to it, and cancelling it and cleaning it up?