I think i get the big problem, try to check please:
==26261== 4136 (2204 direct, 1932 indirect) bytes in 1 blocks are definitely lost in loss record 124 of 139
==26261== at 0x1B90939A: operator new(unsigned) (vg_replace_malloc.c:132)
==26261== by 0x809FC82: main (trm.cpp:62)
==26261== 4136 (2204 direct, 1932 indirect) bytes in 1 blocks are definitely lost in loss record 124 of 139
==26261== at 0x1B90939A: operator new(unsigned) (vg_replace_malloc.c:132)
==26261== by 0x809FC82: main (trm.cpp:62)
To copy to clipboard, switch view to plain text mode
trm.cpp
int main ( int argc, char *argv[] )
{
...
...
// creating splash object
QPixmap pixmap
( ":/trm/images/SplashScreen.png" );
splash->show();
splash
->showMessage
( QObject::tr ("Loading settings..." ) , Qt
::AlignRight | Qt
::AlignBottom , Qt
::black );
// creating main window
twmMainWindow *mytwmMainWindow = new twmMainWindow(); // <-- trm.cpp:62
mytwmMainWindow->show();
// closing and destroing splash screen
splash->finish ( mytwmMainWindow );
delete splash;
// run the main loop!
return app.exec();
}
int main ( int argc, char *argv[] )
{
QApplication app ( argc, argv );
...
...
// creating splash object
QPixmap pixmap ( ":/trm/images/SplashScreen.png" );
QSplashScreen * splash = new QSplashScreen ( pixmap );
splash->show();
splash->showMessage ( QObject::tr ("Loading settings..." ) , Qt::AlignRight | Qt::AlignBottom , Qt::black );
// creating main window
twmMainWindow *mytwmMainWindow = new twmMainWindow(); // <-- trm.cpp:62
mytwmMainWindow->show();
// closing and destroing splash screen
splash->finish ( mytwmMainWindow );
delete splash;
// run the main loop!
return app.exec();
}
To copy to clipboard, switch view to plain text mode
Where hould i delete the statement in trm.cpp:62?
I have to put it in my trm.h and in trm.cpp i have just to do
mytwmMainWindow = new twmMainWindow();
and destroy it at the end?
Thx
Bookmarks