turn from : http://blog.chinaunix.net/uid-24205507-id-3322969.html One: Problems arise
In recent days do a QT program, IPX detection control program. Requires 24x7 operation. You're done, and then you run.
Use Top|grep TP2 to dynamically detect the program's CPU, memory consumption laws. Unfortunately, the memory footprint is up to 30% a night, I go!
Une fuite de mémoire s ' EST produite!!! Write more Java program, write C + + time, really did not pay attention to these memory applications, the issue of release.
Two: Looking for a problem
Colleagues recommend Valgrind Software, under Linux.
sudo apt-get install Valgrind
For installation.
Under Qt Creator, first enter debug mode (left project-then target debug)
Analysis (left analyse). Then you can choose Valgrind
Three: Solve the problem
A piece of code was found. It's too silly to write. The key was not noticed at first.
This software is very good. Recommended. http://www.programgo.com/article/32234380587/
QT Memory Leak Detection