Free an Image

BlitzMax Forums/BlitzMax Programming/Free an Image

BLaBZ(Posted 2013) [#1]
How do you free the memory of an image loaded with LoadImage()?

Thanks!


Yasha(Posted 2013) [#2]
That's what the garbage collector is there to do for you.


col(Posted 2013) [#3]
Global Image:TImage = LoadImage("blah.png")
Image = Null ' This should allow the GC to free up resources associated with the image. This same will apply when the variable associated with the TImage goes out of scope.

At least that's how it should work :P


BLaBZ(Posted 2013) [#4]
Ahh Great! Thanks