如何检测本机C ++应用程序中的内存泄漏? [英] How to detect memory leaks in a native C++ application?
问题描述
我正在尝试使用Analyze-> Performance Profiler并检查内存使用情况以查看是否可以捕获内存泄漏但是当我按下Start时它会运行应用程序而不会在任何断点处停止并显示没有泄漏 - 而我知道有一个内存泄漏,因为
我在应用程序的main()中种了一个。那么,我做错了什么?
I am trying to use Analyze->Performance Profiler and check Memory Usage to see if I can catch memory leaks but when I press Start it runs the application without stopping in any breakpoints and shows no leakage -- while I know there is a memory leak because I planted one in the main() of the application. So, what am I doing wrong?
Juan Dent
Juan Dent
推荐答案
你读过这个吗?
使用CRT库查找内存泄漏
https://docs.microsoft.com/en-us/visualstudio/debugger/finding-memory-leaks-using-the- crt-library?view = vs-2015
- Wayne
Have you read this?
Finding Memory Leaks Using the CRT Library
https://docs.microsoft.com/en-us/visualstudio/debugger/finding-memory-leaks-using-the-crt-library?view=vs-2015
- Wayne
这篇关于如何检测本机C ++应用程序中的内存泄漏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!