Windows 下的 GNU C/C++ 内存泄漏检测

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/283726/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 11:35:42  来源:igfitidea点击:

Memory leak detection under Windows for GNU C/C++

c++windowsopen-sourcememory-leaks

提问by Rob Kam

What memory leak detection tools are available for use with open source C/C++ on Windows?

哪些内存泄漏检测工具可用于 Windows 上的开源 C/C++?

采纳答案by Walter Bright

The mem (revised)package is an effective and straightforward tool to detect memory buffer overflows, underflows, leaks, double-deletion, and dangling references.

MEM(修订版)包是检测存储缓冲器溢出,下溢,泄漏,双缺失,并且悬空引用的有效和简单的工具。

Original link to c.snippets.org, now invalid.

c.snippets.org 的原始链接,现在无效。

回答by Max

I've been using VLD (Visual Leak Detector) for some times, it works nicely for good code, for more complex code; it's not perfect.

我已经使用 VLD(Visual Leak Detector)有一段时间了,它适用于好的代码,也适用于更复杂的代码;它并不完美。

回答by Nick Berardi

WinDbg is always a good choice for any program open or closed.

WinDbg 始终是打开或关闭任何程序的不错选择。

回答by Martin

LeakDiag. Quite hard to find nowadays, but available here. You might also like to get LDGrapher, available in the same place.

泄漏诊断。现在很难找到,但可以在这里找到。您可能还想在同一个地方获得 LDGrapher。