Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Memory full when loading multiple images
#3
(11-02-2024, 11:25 PM)bplus Wrote: To reuse same imagehandle& number:

If imagehandle& < -1 then ' it contains an image
_freeimage imagehandle&
end if

imagehandle& = _LoadImage( ) ' load imagehandle& for reuse

Just do the first thing before each time you do the 2nd thing.

Thank you for your reply. But the wiki says in _FREEIMAGE " Note that calling _FREEIMAGE only frees the handle. It does NOT reset the variable used to store the handle back to 0."
I tried an example loading an image, its handle was -9 (for example), and after calling _FREEIMAGE its handle was -9... how can I know that I have freed the image? Maybe resetting manually the variable to 0?
10 PRINT "Hola! Smile"
20 GOTO 10
Reply


Messages In This Thread
RE: Memory full when loading multiple images - by Ikerkaz - 11-02-2024, 11:32 PM



Users browsing this thread: 2 Guest(s)