소스 검색

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) {