FreeResource

The FreeResource function is obsolete. It is provided to simplify porting of 16-bit Win32-based applications. It is not necessary for Win32-based applications to free resources loaded by using the LoadResource function. The resource obtained by LoadResource is automatically freed when the module is was loaded from is unloaded. However, to save memory and decrease the size of your process's working set, you should release the memory associated with accelerator tables, bitmaps, cursors, icons, and menus by calling the functions in the following table.

Resource Release function
Accelerator table DestroyAcceleratorTable
Bitmap DeleteObject
Cursor DestroyCursor
Icon DestroyIcon
Menu DestroyMenu

See Also

Resources Overview, Resource Functions