History

cleanup and dead code removal

Brad Hefta-Gaub committed 10 years ago

Commit 2eef07e1 parent 12a185712 files · +11 −124Browse files

Showing the changes to domain-server/src/NodeConnectionData.cpp (1 of 12 files). Show all

Unified · Split

domain-server/src/NodeConnectionData.cpp+3−2
@@ -24,10 +24,11 @@ NodeConnectionData NodeConnectionData::fromDataStream(QDataStream& dataStream, c · 23 unmodified lines
2424 char* rawBytes;
2525 uint length;
2626
27− // FIXME -- do we need to delete the rawBytes after it's been copied into the QByteArray?
2827 dataStream.readBytes(rawBytes, length);
2928 newHeader.protocolVersion = QByteArray(rawBytes, length);
30− //qDebug() << __FUNCTION__ << "...got protocol version from node... version:" << newHeader.protocolVersion;
29+
30+ // NOTE: QDataStream::readBytes() - The buffer is allocated using new []. Destroy it with the delete [] operator.
31+ delete[] rawBytes;
3132 }
3233
3334 dataStream >> newHeader.nodeType