QApplication a(argc, argv); InitMyLibrary(); //1 MyWnd w; w.show(); int retVal = a.exec(); FreeMyLibrary(); //2 return retVal;
int retVal;{ MyWnd w; w.show(); retVal = a.exec();}
C++ (Qt)QApplication a(argc, argv);InitMyLibrary(); //1MyWnd *w = new MyWnd();w->show();int retVal = a.exec();delete w;FreeMyLibrary(); //2return retVal;