Does a thread close automatically?

前端 未结 7 1260
萌比男神i
萌比男神i 2021-01-01 10:49

Im using a gmail class so that my app can send me notification over gmail.

Its done like this:

public static void SendMessage(string message)
{
    N         


        
7条回答
  •  無奈伤痛
    2021-01-01 11:16

    The thread will go out of scope and be available for garbage collection as soon as SendFromGmail finishes.

    So yes, it closes automatically.

提交回复
热议问题