version$ = "Memory_leak_FORUM-2'.bas"
' insert YOUR very large picture file here
image$ = "IBM_Electronic_Data_Processing_Machine_-_GPN-2000-001881.bmp"
' "D:\Dit.bmp" is my test .bmp file (~ 16 Mbyte)
count& = 1000000 ' number of _Loadimage(image$) to be tried
xxmax% = 1024
yymax% = 600
image% = 512 ' displayed (square) picture size
lastline% = 25
LINE (0, 0)-(xxmax%
, yymax%
), &HFF80FF80&
' simple graphics task
_PUTIMAGE (xxmax%
- image%
, 0)-(xxmax%
, image%
), image&
PRINT USING "#,###,###"; i&;
' simple update of text task
image& = 0 ' checked to free old image, if it existed
' Image load error handler or notification code here
PRINT "Error loading image "; i&;