title: Clean up before closing the QCoreApplication
body: <p>I have a console-based <code>QCoreApplication</code> which has timers and does socket communication and also uses locked mutex.</p>
  
  <p>When I close the application manually, it gives error saying some mutex is locked and it is timed out. Is there any way I can do clean up in a console application when user closes it?</p>