(*** This bug was imported into bugs.kde.org ***) Package: kdevelop Version: 2.0.1 (using KDE 2.2.1 ) Severity: normal Installed from: SuSE Compiler: gcc version 2.95.3 20010315 (SuSE) OS: Linux (i686) release 2.4.7-4GB OS/Compiler notes: In the main-function of a wizard-generated application you can find the line return a.exec(); This means: After leaving the main loop of the app the program will return directly and calls not the destructor of the toplevel widget. Please change this similar like this: int main(int argc char *argv[]) { int ret; KAboutData aboutData( "kvncserver" I18N_NOOP("KVNCServer") VERSION description KAboutData::License_GPL "(c) 2001 Olaf Dreyer" 0 0 "o.dreyer@mwi-online.de"); aboutData.addAuthor("Olaf Dreyer"0 "o.dreyer@mwi-online.de"); KCmdLineArgs::init( argc argv &aboutData ); KCmdLineArgs::addCmdLineOptions( options ); // Add our own options. KApplication a; KVNCServer *kvncserver = new KVNCServer(); a.setMainWidget(kvncserver); ret = a.exec(); delete kvncserver; return ret; } (Submitted via bugs.kde.org) (Called from KBugReport dialog)
I recommend, instead, doing this: KVNCServer kvncserver; a.setMainWidget(&kvncserver); return a.exec(); } now it will get deleted because it's on the stack and not on the heap.