12-17-2023, 08:21 PM
I just ran across something that I did not either realize or should not be happening.
When an image is freed using _FREEIMAGE the associated variable is not reset to zero but instead retains the negative value of the image assigned. Is this normal behavior?
The code above shows that when images are freed the associated variable retains the image value. I would expect the variable to be reset to zero along with the image being removed from memory.
Is this correct?
When an image is freed using _FREEIMAGE the associated variable is not reset to zero but instead retains the negative value of the image assigned. Is this normal behavior?
Code: (Select All)
image1 = _NEWIMAGE(100, 100, 32)
image2 = _COPYIMAGE(image1)
PRINT image1, image2
_FREEIMAGE image2
PRINT image1, image2
_FREEIMAGE image1
PRINT image1, image2
Is this correct?