loadicon后一定要调用destroyicon吗

Remarks

It is only necessary to call DestroyIcon for icons and cursors created with the following functions: CreateIconFromResourceEx (if called without the LR_SHARED flag), CreateIconIndirect, and CopyIcon. Do not use this function to destroy a shared icon. A shared icon is valid as long as the module from which it was loaded remains in memory. The following functions obtain a shared icon. 

LoadIcon

LoadImage (if you use the LR_SHARED flag) 

CopyImage (if you use the LR_COPYRETURNORG flag and the hImage parameter is a shared icon) 

CreateIconFromResource

CreateIconFromResourceEx (if you use the LR_SHARED flag)

原文地址:https://www.cnblogs.com/time-is-life/p/4363713.html