cleanup OctreeSendThread correctly

This commit is contained in:
ZappoMan 2014-02-26 19:42:22 -08:00
parent 1603c1f38c
commit a34aef658d
2 changed files with 4 additions and 6 deletions

View file

@ -165,7 +165,8 @@ OctreeQueryNode::~OctreeQueryNode() {
//qDebug() << "OctreeQueryNode::~OctreeQueryNode() calling _octreeSendThread->terminate() _octreeSendThread=" << _octreeSendThread; //qDebug() << "OctreeQueryNode::~OctreeQueryNode() calling _octreeSendThread->terminate() _octreeSendThread=" << _octreeSendThread;
_octreeSendThread->terminate(); _octreeSendThread->terminate();
//qDebug() << "OctreeQueryNode::~OctreeQueryNode() calling _octreeSendThread->deleteLater() _octreeSendThread=" << _octreeSendThread; //qDebug() << "OctreeQueryNode::~OctreeQueryNode() calling _octreeSendThread->deleteLater() _octreeSendThread=" << _octreeSendThread;
_octreeSendThread->deleteLater(); //_octreeSendThread->deleteLater();
delete _octreeSendThread;
} }
delete[] _octreePacket; delete[] _octreePacket;

View file

@ -22,20 +22,17 @@ OctreeSendThread::OctreeSendThread(const QUuid& nodeUUID, OctreeServer* myServer
_myServer(myServer), _myServer(myServer),
_packetData() _packetData()
{ {
qDebug() << "client connected this=" << this; qDebug() << "client connected";
_myServer->clientConnected(); _myServer->clientConnected();
} }
OctreeSendThread::~OctreeSendThread() { OctreeSendThread::~OctreeSendThread() {
qDebug() << "OctreeSendThread::~OctreeSendThread()... this=" << this; qDebug() << "client disconnected";
qDebug() << "client disconnected this=" << this;
_myServer->clientDisconnected(); _myServer->clientDisconnected();
} }
bool OctreeSendThread::process() { bool OctreeSendThread::process() {
qDebug() << "OctreeSendThread::process() this=" << this;
quint64 start = usecTimestampNow(); quint64 start = usecTimestampNow();
bool gotLock = false; bool gotLock = false;