Win32 API资源分配释放速查,防止代码资源泄露[1]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 breath 的 blog

 

下面为某次浏览找到的win32资源的分配清除文档,只简单的翻译了几个文字。该

文档对防止资源泄露有很大帮助。抱歉一贴上就串了。

***********************************************************************

资源                     分配函数                                   清除函数              需要手动清除?

======================================================================

 

accelerators       loadaccelerators                         n/a                  no

 

atoms               globaladdatom                        globalfreeatom       yes

 

bitmaps                createbitmap                      deleteobject             yes *

                createbitmapindirect                   deleteobject             yes *

本文关键:Win32 API资源分配释放速查,防止代码资源泄露
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top