Please enable JavaScript to view this site.

Memory Validator Help

Navigation: Examples

Finding memory leaks

Scroll Prev Top Next More

 

Detecting memory leaks

 

This test (and most of those that follow) uses the example application nativeExample.exe.

 

The example program is run once and we use the Memory view to observe and investigate the memory leak.

 

mvMemVal

 

launch nativeExample.exe instructionStep wait until attaching is complete

 

 

nativeExample1

 

menu File menu instructionStep Exit

 

The example program automatically generates some memory leaks when it starts.

 

mvMemVal

 

wait for data transfer to complete

 

The data collection indicators will be disabled when collection has stopped and all data for the session has been processed.

 

Memory tab instructionStep Refresh instructionStep shows all leaked memory in the colour defined for leaks - yellow by default

 

One of the entries is an allocation of 123456 bytes:

 

example-leak

 

expand the entry instructionStep shows the allocation callstack  

 

example-leak-callstack

 

expand the topmost entry on the callstack instructionStep the source code fragment shows where the memory was allocated

 

If there is no source code, or it can't be found, you'll be prompted for the location.

 

example-leak-expanded

 

To edit the source code, double click on the source code.