是否有可能从Visual Studio调试器检测GDI泄漏? [英] Is it possible to detect GDI leaks from the Visual Studio debugger?

查看:398
本文介绍了是否有可能从Visual Studio调试器检测GDI泄漏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

泄露的GDI对象可以从任务管理器或 Process Explorer 中查看。 (你没有看到泄漏,但你可以看到对象管理计数是否不断上升。)



还有一些工具允许按类型查看GDI对象,例如 GDIView [a], DeLeaker DPUS GDIDebug(sourecode)



< .nirsoft.net / utils / gdi_handles.html> GDIView 一个伟大的工具,用于完成识别和确认存在GDI泄漏的工作,但它并不真正帮助您在大型应用程序中找到泄漏的代码。 (我也会在这里注意到,该工具非常好,似乎行为良好,虽然它的主页是一个古怪的( - :)



还有一个WinDBG插件使用MS的 leaktrap Detours图书馆



我也知道(并使用过) AQTime 的资源分析器,可以检测应用程序中的GDI(和其他)资源泄漏,包括泄漏调用的堆栈跟踪。



现在,我的实际问题是:是否可以从VC ++调试器中检测泄漏的GDI对象?因此,一个不需要一个单独的工具和GDI泄漏可以捕获在正常调试和不需要单独检查。

解决方案

GDI对象不必单独检查与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泄漏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆