Does this example code have a memory leak?
i.e. when it loops and calls CopyImage, is the previous tmpimage image freed up automatically each time or do I need a line after Draw image that says FreeImage tmpimage?
Also if CopyImage recogises that an image already exists does it just reuse it instead of freeing and recreating? If so, what happens if I changed the size of image1 during the loop (i.e. if I shrunk it, would the excess memory be freed?)
get it?
Local image% = CreateImage(100,200) For i = 0 to 3 Local tmpimage = CopyImage(image%) DrawImage tmpimage, 0, 0 Next
i.e. when it loops and calls CopyImage, is the previous tmpimage image freed up automatically each time or do I need a line after Draw image that says FreeImage tmpimage?
Also if CopyImage recogises that an image already exists does it just reuse it instead of freeing and recreating? If so, what happens if I changed the size of image1 during the loop (i.e. if I shrunk it, would the excess memory be freed?)
get it?