mirror of
https://github.com/itay-grudev/SingleApplication.git
synced 2024-11-15 12:15:43 +08:00
Fixed memory leak
As described in issue #2 each new socket is not deallocated and creates a memory leak
This commit is contained in:
parent
d33b4c1c61
commit
41eb2c3499
@ -42,6 +42,8 @@ SingleApplication::~SingleApplication()
|
|||||||
*/
|
*/
|
||||||
void SingleApplication::slotConnectionEstablished()
|
void SingleApplication::slotConnectionEstablished()
|
||||||
{
|
{
|
||||||
server->nextPendingConnection();
|
QLocalSocket *socket = server->nextPendingConnection();
|
||||||
|
socket->close();
|
||||||
|
delete socket;
|
||||||
emit showUp();
|
emit showUp();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user