i have simple application that start QDialog from its main like this :
int main(int argc, char *argv[])
 {
     Q_INIT_RESOURCE(resources); 
     QApplication app(argc, argv);
     QCoreApplication::setApplicationName(APP_NAME);
     QCoreApplication::setApplicationVersion(APP_VERISON);
     QCoreApplication::setOrganizationDomain(APP_DOMAIN);
     app.setStyle("WindowsXP");    
     QTextCodec::setCodecForTr(QTextCodec::codecForName("utf8"));
     QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
         AuthenticationDialogContainer *pAuthenticationDialogContainer = new AuthenticationDialogContainer();
     if(pAuthenticationDialogContainer->exec() != QDialog::Accepted ) {
         return 0;
     }
     return app.exec();
}
when its pass the end of the application that is after app.exec() and the application doing what is suppose to do . when i open the windows xp task manager i see that the process is still in memory and i need manually kill it . how can i prevent it from happening ?