# 检查：内存泄漏

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/zh-cn/help/clion/llms.txt).

> **TL;DR**
> `设置 | 编辑器 | 检查`  -  `C/C++ | 数据流分析`
>
>
>
> 默认严重性：   警告
>
>
>
> Clangd   基引擎

作为 [数据流分析](global-dataflow-analysis.html) 的一部分，CLion 提供了   内存泄漏   检查，可检测可能的内存泄漏并帮助您确定其来源。

![检测内存泄漏](https://resources.jetbrains.com/help/img/idea/2026.3/cl_inspection_allocatedmemoryleaked.png)

内存泄漏   检查还会报告可能指向已释放内存的指针：

![检测指向已释放内存的指针](https://resources.jetbrains.com/help/img/idea/2026.3/cl_memleak_ptrdeallocated.png)

您可以在  `设置 | 编辑器 | 检查`  的  `C/C++ | 数据流分析`  节点中更改此检查的 [严重性](configuring-inspection-severities.html) 和 [作用域](configuring-scopes-and-file-colors.html)：

![内存泄漏检查设置](https://resources.jetbrains.com/help/img/idea/2026.3/cl_memoryleak_settings.png)

## See also

### 检查

[数据流分析](global-dataflow-analysis.html) [C/C++ 检查列表](list-of-c-cpp-inspections.html)

### 流程

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

