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



Users browsing this thread: 7 Guest(s)