CLion
 
Get CLion
You are viewing the documentation for an earlier version of CLion.

Inspection: Memory leak

Last modified: 11 February 2024

As part of the Data flow analysis, CLion provides the Memory leak inspection, which detects possible memory leaks and helps you identify their origin.

Detecting a memory leak

The Memory leak inspection also reports the pointers that may point to deallocated memory:

Detecting a Pointer to deallocated memory

You can change the severity and scope of this inspection in Settings | Editor | Inspections, the C/C++ | Data Flow Analysis node:

The Memory Leak inspection settings