文章目录
参考
VS2019中使用AddressSanitizer检测内存问题
In Visual Studio 2019 (VS2019), there are tools available to monitor memory allocation and deallocation, especially for C++ projects. You can use the following methods:
-
Diagnostic Tools (Memory Usage):
- Run your program under debugging.
- Open the Diagnostic Tools window (if it’s not already visible) by selecting
Debug > Windows > Show Diagnostic Tools
. - Click the Memory Usage tab.
- You can take snapshots of your memory and analyze the heap to see how much memory is being allocated and freed.