Inspection: Memory leak
Settings | Editor | Inspections - C/C++ | Data Flow Analysis
Default severity: Warning
Clangd-based engine
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 Detecting a memory leak](https://resources.jetbrains.com/help/img/idea/2024.3/cl_inspection_allocatedmemoryleaked.png)
The Memory leak inspection also reports the pointers that may point to deallocated memory:
![Detecting a Pointer to deallocated memory Detecting a Pointer to deallocated memory](https://resources.jetbrains.com/help/img/idea/2024.3/cl_memleak_ptrdeallocated.png)
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 The Memory Leak inspection settings](https://resources.jetbrains.com/help/img/idea/2024.3/cl_memoryleak_settings.png)
Thanks for your feedback!
Was this page helpful?