title: How to use std::thread?
body: <p>When I use <code>std::thread</code> like this:</p>
  
  <pre><code>func()
  {
     std::thread(std::bind(&amp;foo, this));
  }
  </code></pre>
  
  <p>the thread object is allocated in stack and is destroyed when <code>func()</code> returns.
  So I try to use it like:</p>
  
  <pre><code>func()
  {
     std::thread* threadPtr = new std::thread(std::bind(&amp;foo, this));
  }
  </code></pre>
  
  <p>Where should I <code>delete threadPtr</code>?
  And how can I create a thread that is initially suspended?</p>