问题标签 [visual-leak-detector]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
506 浏览

c++ - 与 Visual Leak Detector 的泄漏对应的代码

我正在尝试在 Visual Studio 2008 中使用 Visual Leak Detector,这是我得到的输出示例:

用户指南说单击任何一行以跳转到相应的文件/代码行;我尝试点击每一行,但没有任何反应!我错过了什么?

0 投票
10 回答
17685 浏览

c++ - Visual C++ - 内存泄漏检测

有什么建议么?这篇 SO 帖子讨论了Visual Leak Detector,但我正在寻找其他工具。另外,请不要推荐这个

0 投票
2 回答
1759 浏览

memory - 视觉泄漏检测器崩溃

我正在使用 Visual Leak Detector 来检测程序中的内存泄漏。程序完成运行后,我得到一个由utility.cpp中的以下代码触发的断言。当 Visual Leak Detector 的标头从程序中排除时,程序运行并退出而不会发生意外。

我不确定为什么要触发断言。有人知道在什么情况下可以触发断言吗?

谢谢

0 投票
7 回答
8647 浏览

c++ - 使用/不使用 Visual Leak Detector 在 C++ 中进行内存泄漏检测

我想在 Windows 中检测我的 C++ 程序的内存泄漏。我还在 MSDN 上阅读了有关mermoy 泄漏检测的文档,并且我也开始使用 Visual Leak Detector。

我对泄漏的报告有疑问。我期待一个带有行号的文件名,但我总是报告下面的文本。它具有泄漏描述的所有组成部分(块类型、内存地址、数据等),但文件名和行号除外。

如果是真的泄漏?如果是,您知道为什么不报告文件/行吗?与此同时,我也在看这个网址

谢谢

0 投票
2 回答
6184 浏览

c++ - 视觉泄漏检测器不工作

我刚刚开始使用Visual Leak Detector for Visual C++ 2008/2010

当我在小型应用程序上运行它时(只有几行未删除的分配),它工作得很好。

现在我想将它运行到我更大的应用程序(wxWidgets 应用程序,2 个线程)中,但是当我包含

我的应用程序没有完全启动。创建 Gui 时它开始循环。Somethismes 应用程序完全加载,但是当我按下某个按钮时再次卡住......

当我点击暂停按钮时,要查看正在处理的代码,我只看到

堆栈:ntdll,内核...

有人遇到类似的问题吗?

有什么办法让它工作吗?

0 投票
3 回答
1043 浏览

c - GetOpenFileName never returns when compiled in debug mode (VS2010)

When I compile my program in debug mode GetOpenFileName(&ofn) never returns.

It works perfectly fine in release mode. The only difference I can spot is that a lot of things are being optimized away in release mode.

I'm compiling using Unicode character set.

If I remove \0 from the middle of ofn.lpstrFilter it works in debug mode, but obviously the filter doesn't function correctly.

This is how the string looks like in the memory in both debug and release mode around the \0 spot:

I'm probably doing something silly (I don't have much winapi /w Unicode experience), but I can't figure out what. Any ideas?

EDIT: Updated with current code.

Basically

works, but

doesn't.

EDIT: Tried reproducing same error in fresh Visual Studio project and I couldn't. It works. Did a diff on project settings and there aren't any mayor differences.

0 投票
1 回答
1682 浏览

c++ - Compiling C code with VLD

I'm trying to compile the SDL libraries with Visual C++ (2010), and with Visual Leak Detector as to find a memory leak in another program that calls SDL.

The problem is that vld.h is a C++ library, and SDL.c is a C program. Accordingly, when I #include , the source doesn't compile as VLD seems to use a C++ specific constructs:

I've attempted compiling SDL.c as a C++ program, but I get a plethora of errors.

Is there any way I can include VLD in SDL?

0 投票
1 回答
1818 浏览

service - 视觉泄漏检测器可以排除误报内存泄漏吗?

比如说,我现在正在使用 Visual Leak Detector (VLD) 来检查我们的服务应用程序中的内存泄漏。而且,由于大量内存分配发生在静态对象中,所以我只是想知道,VLD 可以排除那些误报内存泄漏(它不应该被视为真正的内存泄漏)

非常感激

0 投票
1 回答
1438 浏览

visual-leak-detector - 视觉泄漏检测器:文件和行号不可用

堆栈继续,但没有显示文件。可能是什么原因?

0 投票
2 回答
15020 浏览

c++ - 堆损坏 - “释放堆块 61af0f0 在被释放后修改为 61af194”C++

在我的应用程序中,我收到此错误:

这是一个调用堆栈:

所以据我所知,我得到的错误是由访问(再次删除)已经释放的内存块引起的。尝试找出我的代码到底有什么问题已经是第三天了。在此期间,我发现了一些我已经修复的小内存泄漏,现在 Visual Leak Detector 告诉我它没有检测到任何泄漏。

然而,堆损坏的问题仍然存在。

在我的代码的每个地方,在使用“删除”运算符的地方,我首先检查指针是否不是nullptr. 如果没有,我将其设置为nullptr

所以看起来不止一次释放同一个内存块应该没有问题。

我试图从这个调用堆栈中找出一些东西,但这是我想向你寻求帮助的地方。在调用堆栈中,分配似乎存在问题string,但这究竟意味着什么?最后一个被调用的 MY 函数是string TUtil::intToString(int val) Line 43,所以如果我向您展示该函数的主体可能会更容易:

有时调用堆栈是不同的,因此string TUtil::intToString(int val)其中甚至不存在函数,但它总是与strings 分配有关。

我希望我刚才说的很清楚。如果您需要更多信息,请告诉我,我将在此问题的编辑中提供。