11-02-2024, 11:32 PM
(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! "
20 GOTO 10
20 GOTO 10