Caching graphics to avoid drawing delay?

BlitzMax Forums/BlitzMax Programming/Caching graphics to avoid drawing delay?

OK, thanks that's worth knowing. So I could call this at the start of the game when everything is loaded. But what about this:

- I load in some graphics for the first time on level 1
- I call the imageframe code.
- At the end of the level I set the images to null for Garbage Collection (does this clear them out of VRAM too? probably not...)
- For level two I load in some of the same graphics (not all the same).
- I call the imageframe code again.
- What happens to the old image which was the same, does it remain in VRAM cluttering/taking up space, or will it get shuffled/celared out by the gfx card eventually?
- Also what if I don't free up the image and I just call the code to build the image frame twice, will that cause a problem, or two of the images in VRAM, or is it intelligent and only has one copy? Any ideas?

Thanks.