【发布时间】:2010-07-03 05:03:53
【问题描述】:
我正在使用 Visual Leak Detector 来检测程序中的内存泄漏。当程序完成运行时,我得到一个由 utility.cpp 中的以下代码触发的断言。当 Visual Leak Detector 的标头从程序中排除时,程序运行并退出,不会发生任何事件。
// Get the *real* address of the import. If we find this address in the IAT,
// then we've found that the module does import the named import.
import = GetProcAddress(exportmodule, importname);
assert(import != NULL); // Perhaps the named export module does not actually export the named import?
我不确定为什么要触发断言。有人知道在什么情况下可以触发断言吗?
谢谢
【问题讨论】:
-
exportmodule(DLL 的名称)和 importname(函数的名称)的值是多少?可能 Visual Leak Detector 修补了 DLL 的导入表,这可能解释了这个问题。
-
感谢帕特里克的回复。我无法调试线路本身。一旦我单击某处(任何地方),断言窗口就会消失。大多数时候,我从窗口中听到“错误”声音,甚至没有弹出窗口。现在,我已经远离 VSD,而是选择了标准泄漏检测。不是理想的解决方案,但在这种情况下,我别无选择。
-
此错误已在最新源代码中修复。
标签: memory memory-leaks ogre3d visual-leak-detector