Freeimage success

BlitzPlus Forums/BlitzPlus Programming/Freeimage success

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.

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