![]() ![]() Then debug the code ( F5), when the breakpoint is hit, click Take snapshot on the Memory Usage summary toolbar.Click Debug > Windows > Show Diagnostic Tools and pick memory usage.Put a breakpoint on the first line "int a.".InteractivelyĬreate the following main.cpp file (in a new console application) : #include ![]() The main idea is to take a snapshot of the heap at the beginning and at the end of the process, then to compare the states of memory to detect potential memory leaks. Visual Studio 2019 has a decent memory analysis tool, it may be used interactively while debugging or by programming (without debugging), I show a minimal example in both cases in the following. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
February 2023
Categories |