Freeimage success

BlitzPlus Forums/BlitzPlus Programming/Freeimage success

I remmember someone inquiring wether freeimage removes that image from memory, or wther it only just removces the pointer to it:proof that it completely removes the image:
THIS PURPOSELY CRASHES::::DEBUG ON!
Graphics 400,300,16,2


SetBuffer BackBuffer()


image=CreateImage(10,10)

SetBuffer (ImageBuffer(image))

Rect 0,0,10,10

SetBuffer BackBuffer()

;because using this image handle merely copies the memory location, 
;the image handles will be sharing the same part of memory
image2=image


FreeImage image

Cls

;this will be invalid as FreeImage 
;frees he image from the specified 
;memory location of the Handle
DrawImage image2,0,0


Flip

WaitKey()

End