Using Visual Leak Detector
问题 I have C++ code that crashes randomly. In the code I have used some of the Qt libraries. The compiler is MSVS 2010. Based on some suggestions that this could be due to memory leaks, I started looking in this using Visual Leak Detector. I am very new to Visual Leak Detector and memory leak detection. Here is the code in main.cpp: int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; w.show(); return a.exec(); } And also the MainWindow constructor looks like this: