PDA

View Full Version : Detecting memory leaks when using QT Creator on Windows



StanB
26th December 2010, 17:05
I know threads about memory leak detection have come and gone several times on this forum. But this question is one I cannot let go.

I am currently developing an application in QT Creator on Windows and am close to finishing up. However, I have the feeling that I might have a memory leak or two. This let me to investigate if there are any leak detection tools that could work on my particular setup. Apparently not. A couple of days ago I posted about this on stackoverflow (http://stackoverflow.com/questions/4527325/memory-leak-checking-on-windows-with-qt-and-mingw32), and no one there seems to know an answer either. The only thing I can come up with is jumping ship to visual studio and using the CRT to detect memory leaks.

I am well aware of the fact that strictly seen this is not a QT issue, however it is a question closely related to the software development kit that is distributed. I think it's quite important to make sure the quality of QT-based software is up to standards. Is there anyone who can lead me to a working memory leak detection system for my setup?

squidge
26th December 2010, 20:41
Pageheap.exe (http://support.microsoft.com/kb/286470) introduces a software validation layer (Page Heap manager) between the application and the system that verifies all dynamic memory operations (allocations, frees, and other heap operations). When Page Heap manager is enabled, the application that is being tested is then started under a debugger. If a problem is encountered, it will cause a debugger break.