don't give timers owners while also keeping track of them in as class instance variables

This commit is contained in:
Seth Alves 2015-04-29 19:18:58 -07:00
parent 3c2894adb3
commit 09eea83461
2 changed files with 3 additions and 3 deletions

View file

@ -53,7 +53,7 @@ Octree* EntityServer::createTree() {
}
void EntityServer::beforeRun() {
_pruneDeletedEntitiesTimer = new QTimer(this);
_pruneDeletedEntitiesTimer = new QTimer();
connect(_pruneDeletedEntitiesTimer, SIGNAL(timeout()), this, SLOT(pruneDeletedEntities()));
const int PRUNE_DELETED_MODELS_INTERVAL_MSECS = 1 * 1000; // once every second
_pruneDeletedEntitiesTimer->start(PRUNE_DELETED_MODELS_INTERVAL_MSECS);

View file

@ -74,13 +74,13 @@ void ThreadedAssignment::commonInit(const QString& targetName, NodeType_t nodeTy
// this is a temp fix for Qt 5.3 - rebinding the node socket gives us readyRead for the socket on this thread
nodeList->rebindNodeSocket();
_domainServerTimer = new QTimer(this);
_domainServerTimer = new QTimer();
connect(_domainServerTimer, SIGNAL(timeout()), this, SLOT(checkInWithDomainServerOrExit()));
_domainServerTimer->start(DOMAIN_SERVER_CHECK_IN_MSECS);
if (shouldSendStats) {
// send a stats packet every 1 second
_statsTimer = new QTimer(this);
_statsTimer = new QTimer();
connect(_statsTimer, &QTimer::timeout, this, &ThreadedAssignment::sendStatsPacket);
_statsTimer->start(1000);
}