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

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

Forum Jump:


Users browsing this thread: 1 Guest(s)