Fixed memory leak

As described in issue #2 each new socket is not deallocated and creates a memory leak
This commit is contained in:
Itay Grudev 2015-05-07 15:29:06 +01:00
parent d33b4c1c61
commit 41eb2c3499

View File

@ -42,6 +42,8 @@ SingleApplication::~SingleApplication()
*/
void SingleApplication::slotConnectionEstablished()
{
server->nextPendingConnection();
QLocalSocket *socket = server->nextPendingConnection();
socket->close();
delete socket;
emit showUp();
}