# HG changeset patch # User displacer # Date 1170461956 0 # Node ID 86f3d818da1c98db578ce8fa126767999c71c3f9 # Parent e4cd3cd209c6373581c479085d2488308aca83f2 small memory leak fixed diff -r e4cd3cd209c6 -r 86f3d818da1c QTfrontend/tcpBase.cpp --- a/QTfrontend/tcpBase.cpp Sat Feb 03 00:04:52 2007 +0000 +++ b/QTfrontend/tcpBase.cpp Sat Feb 03 00:19:16 2007 +0000 @@ -51,11 +51,10 @@ // connection should be already finished return; } - QTcpSocket * client = IPCServer->nextPendingConnection(); - if(!client) return; - IPCSocket = client; - connect(client, SIGNAL(disconnected()), this, SLOT(ClientDisconnect())); - connect(client, SIGNAL(readyRead()), this, SLOT(ClientRead())); + IPCSocket = IPCServer->nextPendingConnection(); + if(!IPCSocket) return; + connect(IPCSocket, SIGNAL(disconnected()), this, SLOT(ClientDisconnect())); + connect(IPCSocket, SIGNAL(readyRead()), this, SLOT(ClientRead())); SendToClientFirst(); } @@ -74,6 +73,8 @@ void TCPBase::ClientDisconnect() { IPCSocket->close(); + delete IPCSocket; + IPCSocket = 0; onClientDisconnect();