瀏覽代碼

Fix memleak

Alexey Edelev 5 年之前
父節點
當前提交
9e82e26f19
共有 1 個文件被更改,包括 1 次插入1 次删除
  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) {