报告查找内存泄漏

报告查找内存泄漏

本文介绍了如何使用“内存使用情况”报告查找内存泄漏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用VS 2017内存使用情况报告来查找我的应用程序中的内存泄漏。

I use VS 2017 Memory Usage report to find memory leaks in my application.

以下是该报告的示例屏幕截图:

Here is a sample screenshot of the report:

我从报告中了解到的是保持对几个

I understand from the report the something is keeping references to several

vScriptManager对象实例的引用,我的代码实际上是一个错误。

vScriptManager object instances, what is actually an error in my code.

我的问题是,如何在我的代码中找到什么是对这些对象实例的引用?

My question is, how can I find in my code what is holding that references to these object instances ?

谢谢。

推荐答案

https://docs.microsoft.com/en-us/visualstudio/profiling/memory-usage#managed-types-reports

如果我们使用Performance Profiler分析内存并生成报告,我们可以查看源代码右键单击函数名称的函数:

 

问候,

Fletcher


这篇关于如何使用“内存使用情况”报告查找内存泄漏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-27 07:08