-
Bug
-
Resolution: Done
-
P4: Low
-
None
-
5.0.2
-
None
-
clang3.2, mac osx 10.8.3, Qt5.0.2
The instruments always show that I have some memory leaks(as graph) even the most simplest Qt app I created, the memory of activity monitor also steadily raising.
#include <QApplication>
#include <QLabel>
int main(int argc, char *argv[])
{ QApplication a(argc, argv); QLabel w; w.resize(320, 240); w.show(); return a.exec(); }http://i.stack.imgur.com/oW7Hf.png%28Call
http://i.stack.imgur.com/frjpP.png%28Leaked
I alter the codes a little bit, and see the memory leak show by Instruments would keep rising or not.
#include <QLabel>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
for(size_t i = 0; i != 100; ++i)
{ QLabel w; w.resize(320, 240); w.show(); } QLabel w;
w.resize(320, 240);
w.show();
return a.exec();
}
http://i.stack.imgur.com/O5dhh.png%28Call
http://i.stack.imgur.com/aa7su.png%28Leaked
The memory leak do increase, I strongly hope that this is a mistake of the instrument.
After I changed it to infinite loop, not only instruments, but the memory showed by activity monitor also increase steadily(would increase and decrease, but in the long run, it is increasing), no matter private memory or real memory.
I don’t think this simple app could pass the quality check of the mac app store(OSX). What is going on?How should I explain this phenomenon?If there are no memory leak, I should not see any message of the leak object, am I correct?A bug of Qt5.0.2?