title: Qt Signals and Slots object disconnect?
body: <p>I am wondering if i need to disconnect singals and slots if i destroy the signal emitting object. Here is an example:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>QAudioOutput * audioOutput = new QAudioOutput(format,mainWindow);
  connect(audioOutput,SIGNAL(stateChanged(QAudio::State)),this,SLOT(stateChanged(QAudio::State)));
  
  delete audioOutput;
  
  audioOutput = new QAudioOutput(format,mainWindow);
  connect(audioOutput,SIGNAL(stateChanged(QAudio::State)),this,SLOT(stateChanged(QAudio::State)));
  </code></pre>
  
  <p>Will this automatically disconnect the signal from the old audioOutput, or will it lead to mem leaks or some other undefined behavior ?</p>
  
  <p>Thank you in advance.</p>