Let's find out if FLUSH VIDEO MEMORY works like that:
sync on :sync rate 60
backdrop on : color backdrop rgb(128,128,128)
autocam off : hide mouse
` make images - red first
ink rgb(255,0,0),0 : box 0,0,127,127 : get image 1,0,0,128,128
` green
ink rgb(0,255,0),0 : box 0,0,127,127 : get image 2,0,0,128,128 : cls
` blue
ink rgb(0,0,255),0 : box 0,0,127,127 : get image 3,0,0,128,128 : cls
` brown
ink rgb(255,128,64),0 : box 0,0,127,127 : get image 4,0,0,128,128 : cls
` yellow
ink rgb(255,255,0),0 : box 0,0,127,127 : get image 5,0,0,128,128 : cls
` make objects cube first
make object cube 100,10 : position object 100,-200.0,0.0,0.0 : texture object 100,1 : ` red cube
make object cone 101,10 : position object 101,-150.0,0.0,0.0 : texture object 101,2 : ` green cone
make object cylinder 102,10 : position object 102,-100.0,0.0,0.0
texture object 102,3 : ` blue cylinder
make object triangle 103,-50.0,0.0,0.0,-45.0,5.0,0.0,-40.0,0.0,0.0
texture object 103,4 : ` brown triangle
make object sphere 104,10 : position object 104,0.0,0.0,0.0 : texture object 104,5 : ` yellow sphere
position camera -100.0,10.0,-150.0
point camera -100.0,0.0,0.0
ink rgb(255,255,255),0
sw = screen width() * .5 : ts = 10 : vmf = 0 : sh = screen height()
tw = text width("Video memory flushed!") * .5
repeat
if returnkey() = 1 and vmf = 0
time = timer() + 1200
flush video memory
repeat
text sw - tw,ts,"Video memory flushed!" : vmf = 1
sync
until timer() > time
endif
control camera using arrowkeys 0,3.0,1.5
if vmf = 0
text 10,sh - 40,"Press the [ENTER] key to flush video memory."
else
text 10,sh - 40,"Press [SPACEBAR] to exit."
endif
sync
until spacekey() = 1
backdrop off
for img = 1 to 5
if image exist(img) = 1
text 100,img * 20,"Image " + str$(img) + " exists."
delete image img
else
text 100,img * 20,"Image " + str$(img) + " does not exist."
endif
next img
for obj = 100 to 104
if object exist(obj) = 1
text 100,((obj - 99) * 20) + 100,"object " + str$(obj) + " exists."
delete object obj
else
text 100,((obj - 99) * 20) + 100,"object " + str$(obj) + " does not exist."
endif
next obj
text 10,sh - 40,"Press any key to quit."
sync
wait key
show mouse
end
The answer is:
No, it doesn't. You must delete images, objects, memblocks, arrays, etc. yourself.
LB