Archived

This topic is now archived and is closed to further replies.

freeing custom Resources

This topic is 6363 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi Does anybody know how to free custom Resources, that have been loaded. There is a FreeResource Method, but it is obsolete. Can this still be used to free Resources, or is there an other way to release the Memory, resources occupy in Memory ? Lars

Share this post


Link to post
Share on other sites
The FreeResource function is obsolete. It is provided only for compatibility with 16-bit Windows. It is not necessary for Win32-based applications to free resources loaded by using the LoadResource function. A resource is automatically freed when its module is unloaded.

To save memory and decrease the size of your process''s working set, Win32-based applications should release the memory associated with resources by calling the following functions.

    
// Resource Release function

// ----------------- ------------------------------

// Accelerator table DestroyAcceleratorTable

// Bitmap DeleteObject

// Cursor DestroyCursor

// Icon DestroyIcon

// Menu DestroyMenu


Share this post


Link to post
Share on other sites
What a fine copy out of the documentation...
I know that, but i have an Custom Resource which has no default name and no functions to Destroy it, at least there is non specified in the docs.

Lars

Share this post


Link to post
Share on other sites