title: Lifetime of Qt Objects
body: <p>What are the lifetimes of Qt Objects?</p>
  
  <p>Such as:</p>
  
  <pre><code>QTcpSocket *socket=new QTcpSocket();
  </code></pre>
  
  <p>When socket will be destroyed? Should I use </p>
  
  <pre><code>delete socket;
  </code></pre>
  
  <p>Is there any difference with:</p>
  
  <pre><code>QTcpSocket socket;
  </code></pre>
  
  <p>I couldn't find deep infromation about this, any comment or link is welcomed.</p>