Abstract:Qt inherits C++ language dynamic allocating memory management mechanism, it ensures that the developers can flexible use memory according to the actual needs. Meanwhile Qt has to face the “memory leak” problem of serious threating to software security. Although Qt adopted measures such as semi-automatic memory management mechanism, it has not fundamentally solved the problem. Therefore, this paper proposes a static detection method of software based Qt memory leak. For this semi-automatic memory management mechanism of QT, this method can identify whether belongs to the scope of Qt automatic management by statically analyzing these codes where the tested object allocated memory. Thereby it can accurately detect memory leak and memory repeated release. And based on this detection method, an automatic Qt memory leak detection tool is designed. This tool can greatly improve the test efficiency.