DrawFrameControl 中的 GDI 资源泄漏
看来 DrawFrameControl() 创建了 Font 和 Brush 对象,将它们选择到 dc 中,并且不删除它们。 (根据 BoundsChecker 消息)。 有人遇到过这样的事情吗?
It seems that DrawFrameControl() creates Font and Brush objects, select them into dc, and doesn't delete them. (according to BoundsChecker messages). Does anyone faced such thing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在各种 OS/CRT Dll 中也经历过同样的情况。
其中一种模式是
由于这些警告绝对不在我的代码中,因此我建议对它们持保留态度。
一般来说,我所做的就是清除所有引用我的代码的 BC 警告。
题外话:BC 抛出了很多开发人员无法在代码中修复的警告。 在stl中你会看到无数的警告,但大多数都是“比较不相关的指针”。 这并不意味着 BC 错误地抛出了它们。 在常规应用程序中“比较不相关的指针”可能是一场灾难,但我认为编写 stl 实现的人知道他们在做什么,并且可能已经检查了这些情况。
I have experienced the same in various OS/CRT Dlls.
One of the patterns is where
Since these warnings are definitely not in my code, I would advise on taking them with a grain of salt.
Generally what I do is I cleanup any BC warnings that have a reference to my code.
Off topic: BC throws a lot of warnings that a developer can not fix in his code. In stl you will have a myriad of warnings, but most of them are "comparing unrelated pointer". This does not mean that BC is mistakenly throwing them. "Comparing unrelated pointer" in a regular app can be a disaster, but I think the guys that wrote the stl implementation know what they are doing and probably have examined those cases anyway.