03-07-2024, 07:14 PM
(This post was last modified: 03-07-2024, 07:15 PM by a740g.
Edit Reason: Fixed some typo
)
(03-07-2024, 07:03 PM)Pete Wrote: If you just have a few small images, approx. 10, would it be better to load each at the top of the program and keep them in memory, or use the _LOAD statement each time they are needed? In my routine, these images overlay each other, so they get exchanged a lot; so the way I'm doing this now is to load them only when needed, and free them once loaded and displayed.
Here is the routine I'm working on: https://qb64phoenix.com/forum/showthread...8#pid23598
Thanks,
Pete
If you are going to display those images often (like in the routine, you shared), then it is a good idea to load and cache the images in memory until you are sure you'll not need those anymore. The _LOADIMAGE function adds quite a bit of processing overhead that may not really show until you are calling _LOADIMAGE inside tight loops. My two cents.