CLion
 
Get CLion
Join the CLion 2025.1 Early Access Program and try out new features before they are released! Find out more

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