# Inspection: Memory leak

> **TL;DR**
> `Settings | Editor | Inspections` - `C/C++ | Data Flow Analysis`
>
>
>
> Default severity: Warning
>
>
>
> Clangd-based engine

As part of the [Data flow analysis](global-dataflow-analysis.html), CLion provides the Memory leak inspection, which detects possible memory leaks and helps you identify their origin.

![Detecting a memory leak](https://resources.jetbrains.com/help/img/idea/2026.2/cl_inspection_allocatedmemoryleaked.png)

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

![Detecting a Pointer to deallocated memory](https://resources.jetbrains.com/help/img/idea/2026.2/cl_memleak_ptrdeallocated.png)

You can change the [severity](configuring-inspection-severities.html) and [scope](configuring-scopes-and-file-colors.html) of this inspection in `Settings | Editor | Inspections`, the `C/C++ | Data Flow Analysis` node:

![The Memory Leak inspection settings](https://resources.jetbrains.com/help/img/idea/2026.2/cl_memoryleak_settings.png)

## See also

### Inspections

[Data flow analysis](global-dataflow-analysis.html) [List of C/C++ inspections](list-of-c-cpp-inspections.html)

### Procedures

[Valgrind memcheck](memory-profiling-with-valgrind.html)

