title: Does C++ 11 thread automatically destroy after detach
body: <p>Normally, I would assume that C++ 11 thread automatically destroy after detach. But the thing is, I can't find anything to prove this assumption. </p>
  
  <p>According to <a href="http://www.bogotobogo.com/cplusplus/C11/1_C11_creating_thread.php" rel="noreferrer">this article</a></p>
  
  <blockquote>
    <p>Once detached, the thread should live that way forever.</p>
  </blockquote>
  
  <p>forever? If the function of the thread finish, Does its resource remain forever?</p>
  
  <p>According to <a href="http://www.cplusplus.com/reference/thread/thread/detach/" rel="noreferrer">this article</a></p>
  
  <blockquote>
    <p>After a call to this function, the thread object becomes non-joinable and can be destroyed safely.</p>
  </blockquote>
  
  <p>It can be destroyed safely, but is it automatically?</p>
  
  <p>If it's not destroyed automatically, how to destroy it (not forcefully, but after the function of the thread end)</p>
  
  <p>Thanks for reading.</p>