CLion 2024.1 Help

Inspection: Memory leak

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
Last modified: 16 April 2024