Please enable JavaScript to view this site.

Memory Validator Help

Navigation: Examples

Finding double deallocations

Scroll Prev Top Next More

 

Detecting double deallocations

 

The example program is run once and we use the Memory view to observe and investigate any double deallocations.

 

For each double deallocation, Memory Validator displays the allocation and deallocation locations.

 

mvMemVal

 

launch nativeExample.exe instructionStep wait until attaching is complete

 

 

nativeExample1  

 

menu Memory Errors menu instructionStep Incorrect Usage instructionStep Double Delete instructionStep forces a double deallocation in the example application

 

If a heap warning dialog appears, choose Ignore to continue.

 

menu File menu instructionStep Exit

 

mvMemVal

 

wait for data transfer to complete

 

Memory tab instructionStep Refresh instructionStep shows the usual leaks and also multiple deallocations using the colour defined.

 

example-double-dealloc

 

 

expand the most recent double deallocation instructionStep shows the locations for allocation, free and double free

 

expand the topmost entries in each callstack instructionStep shows the successive lines of the test in CTeststakView::OnTestDoubledeleteofmemory()

 

example-double-dealloc-locations