Browse Source

Fix memleak

Alexey Edelev 5 years ago
parent
commit
9e82e26f19
1 changed files with 1 additions and 1 deletions
  1. 1 1
      main.cpp

+ 1 - 1
main.cpp

@@ -44,7 +44,7 @@ int main(int argc, char *argv[])
         return 1;
     }
 
-    QFileSystemWatcher* watcher(new QFileSystemWatcher(QStringList() << commandFile));
+    QFileSystemWatcher* watcher(new QFileSystemWatcher(QStringList() << commandFile, &a));
     QObject::connect(watcher, &QFileSystemWatcher::fileChanged, [&](const QString &path){
         qDebug() << "watcher alarm";
         if(path == commandFile) {