Thanks for answering,
Well apart for the misleading m_ at the beginning that variable is non memeber,
what I do is call this method whenever I have to send a message to a TcpServer

Qt Code:
  1. void QSendAlarm::SendEndAlarm()
  2. {
  3. bool ret;
  4. QTcpSocket mySocket;
  5. mySocket.connectToHost("127.0.0.1", 740);
  6. ret=mySocket.waitForConnected();
  7. mySocket.disconnectFromHost();
  8. ret=mySocket.waitForDisconnected();
  9. QAbstractSocket::SocketError se;
  10. se=mySocket.error();
  11.  
  12. mySocket.abort();
  13. mySocket.close();
  14. }
To copy to clipboard, switch view to plain text mode 

So the variable goes out of scope everytime, but the handles increase everytime I call connectToHost, is that a leak or I'm missing something?

Thanks again
bye