|
Post by 1180michel on Oct 1, 2022 4:14:44 GMT -5
Hi ! I have a problem whith "unloadbmp" after loading an image with "LoadImageFile" (from Image323.dll) : the image is well unnloaded, but the ram doesn't free up anything... I can see that with the task manager. If the image was loaded with "loadbmp", no problem. Is there a way to solve this issue ? Thanks a lot ! 1180michel
|
|
|
Post by Brandon Parker on Oct 1, 2022 5:52:27 GMT -5
If you load an image with a function from a DLL such as LoadImageA, you will need to utilize the corresponding DLL function to unload the image properly. UnloadBMP is only for unloading BMPs loaded using LoadBMP. Try using one of the following API functions if you are using a Windows API function to load an image file: Resource | Release Function | Bitmap | DeleteObject | Cursor | DestroyCursor | Icon | DestroyIcon |
{:0) Brandon Parker
|
|
|
Post by 1180michel on Oct 1, 2022 9:39:59 GMT -5
Thanks a lot, Brandon, "DeleteObject" works perfect ! Have a nice day, 1180michel
|
|
|
Post by Brandon Parker on Oct 1, 2022 14:59:50 GMT -5
As always, I am very happy to be of assistance where I can!
{:0)
Brandon Parker
|
|
|
Post by Walt Decker on Oct 1, 2022 17:30:40 GMT -5
Good programming practice:
Whatever one creates one must destroy
|
|