The Memory Debugger can provide a visual depiction of the heap. [br]


[/url]You create this view in the same way as any other:
  1. [/url]Select Tools > Memory Debugging.
  2. [/url]Select Enable Memory Debugging with the Configuration Tab.
  3. [/url]Select the Heap Status Tab.
  4. [/url]If you want leaks to be displayed, press the ... button next to the Graphical View pulldown.
  5. [/url]In the Preferences Window, select Label leaked memory blocks. If you are debugging a C++ program, you probably also want to select Check interior pointers during leak detection.
  6. [/url]After pressing OK, let your program run until a breakpoint.
  7. [/url]Press the Generate View button.
The top area displays bars indicating allocated memory blocks. The block's coloring indicates the block's status. You can change the scale of what is displayed using the magnifying glass icons just above and to the right of the blocks.[br]
[/url]When you select a block in the top area, the Memory Debugger looks up information on the block and displays information in the bottom area. While the block you selected is highlighted, the Memory Debugger also highlights other blocks created by code that had the same backtrace.[br]
[/url]The bottom area can display information in two ways:
  • [/url]Heap Information: the center pane displays information on the block that you selected, and the right pane displays information about all blocks that were created that have the same backtrace.
  • [/url]Backtrace/Source: Contains two panes that display the backtrace that existed when the block was allocated and the line that caused the allocation to occur.
[/url]If you right-click your mouse
on a block in the top portion, the Memory Debugger displays a menu
containing a Properties command. If you select this command, the Memory
Debugger both displays its Block Properties window, which contains more
information about the block, and begins tracking this block for you.