954,480 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Qt example with memory leak

Hello.
I compiled a basic GUI example written with Qt. When I run with valgrind, it tells that there is memory leak.
It is stranger, because at each time I run the app, the number of malloc calls are different. Qt seems nondeterministic.

#include <QApplication>
 #include <QPushButton>

 int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);

     QPushButton hello("Hello world!");
     hello.resize(100, 30);

     hello.show();
     return app.exec();
 }
Hand
Newbie Poster
9 posts since Jul 2010
Reputation Points: 10
Solved Threads: 0
 

You may want to ask this question here:

http://www.qtforum.org/

or on the #qt channel on freenode.net (IRC)

daviddoria
Posting Virtuoso
1,996 posts since Feb 2008
Reputation Points: 437
Solved Threads: 204
 

You should use Deleaker or BoundsChecker...

MastAvalons
Light Poster
31 posts since Jan 2012
Reputation Points: 10
Solved Threads: 1
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: