SourceComment: Don’t check for null before delete

Dear all

Instead of

TcpConnection::~TcpConnection()
{


    if (socket) {
socket->disconnect (this);
delete socket;
}
if (timer) {
delete timer;
}

have

if (socket)
socket->disconnect (this);
delete socket;
delete timer;

– cheerio atul

Would you like to post a relpy?


This post starts a thread.
No follow-ups yet.