Large Amount of Memory Used Drawing Photos

BlitzMax Forums/BlitzMax Programming/Large Amount of Memory Used Drawing Photos

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Basically, only keep 2 images in memory at once - the current one (for display and use within your fade), and the next one. Once the next one is fully visible, null the last one (so it's freed from memory), and load the next one in ready for the transition.
I did this in my current game using a tList.

If I want to fade to a new image, I load a new one and add it with 'tList.AddLast object'. An object would just contain a tImage field, and an alpha float.

I know that if there are two items in the list, then I'm supposed to be fading the last one in (newest), and the first one out (oldest).

When the alpha of the first one reaches 0, I remove it from the list. When the object and therefore the tImage go out of scope, GC cleans it up.

Rinse, repeat.