How do I FreeImage()?

BlitzMax Forums/BlitzMax Beginners Area/How do I FreeImage()?

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.

If you're using integer handles eg:

RandomImage = LoadImage( <path> )


Then you need to use "Release RandomImage". If you're using explicit references, eg:

RandomImage:TImage = LoadImage( <path> )


When there are no more references to the loaded image, it will be freed automatically. Therefore,

RandomImage:TImage = LoadImage( <path> )
DrawImage RandomImage, 0, 0
RandomImage = Null


Will free the loaded image.