问题描述
可以从任务管理器或。 (嗯,你没有看到泄漏,但是你可以看到对象的数量是否持续上升。)
还有一些工具允许按类型查看GDI对象,例如 [a],,或。
[a]请注意,我认为是完成工作的好工具识别和确认存在的GDI泄漏,但它并不真正帮助您在大型应用程序中找到泄漏代码。 (我也会在这里注意到,该工具非常好地工作,似乎表现良好,尽管它的主页有点奇怪( - :)
还有一个WinDBG插件叫做,使用MSs 。
我也知道(并已使用)的资源分析器,允许在应用程序中检测到GDI(和其他)资源泄漏,包括泄露呼叫的堆栈跟踪
现在,我的实际问题是:是否可以从VC ++调试器中检测泄漏的GDI对象?需要一个单独的工具,并且在正常调试期间可以捕获GDI泄漏,而不必单独检查。
GDI对象不一定是chec他们可以单独(非常),他们可以负责Deleaker - 你会知道泄漏的地方。仔细阅读说明,并观看演示视频:http://deleaker.com/
Leaking GDI objects can be seen from the task manager or from Process Explorer. (Well you don't see the leaks, but you can see if object uasage count continually goes up.)
There are also tools that allow to view GDI objects by type, such as GDIView[a], DeLeaker, DPUS or the GDIDebug (sourecode).
[a] Note that I consider GDIView a great tool to get the job done of identifying and confirming the existance GDI leaks, but it doesn't really help you to find the leaking code in large applications. (I will also note here that the tool works very nicely and seems well behaved, although its homepage is a littlebit weird (-: )
There is also a WinDBG plugin called leaktrap that uses MSs Detours Library.
I also know (and have used) AQTime's Resource Profiler that allows to detect GDI (and other) resource leaks in an application including stack traces for the leaking calls.
Now, my actual question however is: Is it possible to detect leaking GDI objects from within the VC++ debugger? So that one doesn't need a separate tool and GDI leaks can be caught during normal debugging and not have to be checked separately.
GDI objects do not have to be checked individually (notreally), they can be in charge with Deleaker - and you'll know where the leak. Read the instructions carefully and view a demo video :http://deleaker.com/
这篇关于是否可以从Visual Studio调试器检测GDI漏洞?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!