Resolve Issue
Intel® Inspector
is a dynamic memory and threading error checking tool for users developing serial and multithreaded applications on Windows* and Linux* operating systems. This topic is part of a
tutorial
that shows how to find and fix
memory
errors using the
Intel Inspector
and a
C++
sample application.
To fix the detected memory error:
Investigate the Issue
The commenting embedded in the
find_and_fix_memory_errors.cpp
sample file reveals the cause of the
Mismatched allocation/deallocation
problem:
delete
is the appropriate deallocation function, not
free
.
Access an Editor
Double-click the highlighted code in the
Source
tab to open the
find_and_fix_memory_errors.cpp
source file in an editor.
Change the Source Code
- Commentfree(drawing);and uncomment//delete drawing;.
- Save your edits.
- Click the result tab to return to theSourceswindow.TheSourceswindow data is unchanged because it is a snapshot of the source code at the time of analysis.
- Click theSummarybutton to redisplay theSummarywindow.