Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Memory full when loading multiple images
#7
(11-03-2024, 12:22 AM)bplus Wrote: BTW I am starting to wonder if you are wasting allot of time reloading the same images into your program when you should be just switching imagehandles between loaded images.
Can I switch handles, and the image "inside" the variable also changes? I thought it was impossible.
Something like that:

Code: (Select All)
Img1=_LOADIMAGE("sun.png")
Img2=_LOADIMAGE("moon.png")
Dest=Img1 ' Now Dest is the picture of the sun
Dest=Img2 ' Now it is the moon

EDIT: I made a quick program with only 10 images loading and "speed switching" between them, and it seems that it works!!! I will try this with my game. THANK YOU VERY MUCH !!!


(11-03-2024, 02:49 AM)SMcNeill Wrote: Without sharing the code, there's no way anyone can tell you where to place a _FREEIMAGE statement.   Share what you have, and then we can help point out what might be the best solution for your problems, so you can fix them and move forward without your memory leaking.  Wink
My code is too large... I wouldn't know what piece to share in order you can help me Sad


Anyway, thank you both for your help Wink
10 PRINT "Hola! Smile"
20 GOTO 10
Reply


Messages In This Thread
RE: Memory full when loading multiple images - by Ikerkaz - 11-03-2024, 09:21 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  about Hardware Images and _DisplayOrder,Help! qbfans 11 574 02-11-2026, 07:10 AM
Last Post: SMcNeill
  Nth problem with hardware images Ikerkaz 9 503 01-23-2026, 02:58 PM
Last Post: bplus
  Hardware images questions Dav 5 477 12-04-2025, 04:18 PM
Last Post: Pete
  Hardware images...Talk to me! Unseen Machine 5 741 09-22-2025, 11:12 PM
Last Post: TempodiBasic
  Loading from file into _MEM? and LEN a TYPE... Unseen Machine 9 976 08-03-2025, 02:55 AM
Last Post: SMcNeill

Forum Jump:


Users browsing this thread: 1 Guest(s)