CLion 2023.3 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: 23 February 2024