Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
_FREEIMAGE Behavior
#1
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?

Code: (Select All)
image1 = _NEWIMAGE(100, 100, 32)
image2 = _COPYIMAGE(image1)

PRINT image1, image2
_FREEIMAGE image2
PRINT image1, image2
_FREEIMAGE image1
PRINT image1, image2
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?
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Reply


Messages In This Thread
_FREEIMAGE Behavior - by TerryRitchie - 12-17-2023, 08:21 PM
RE: _FREEIMAGE Behavior - by MasterGy - 12-17-2023, 08:59 PM
RE: _FREEIMAGE Behavior - by TerryRitchie - 12-17-2023, 09:13 PM
RE: _FREEIMAGE Behavior - by SMcNeill - 12-17-2023, 09:05 PM
RE: _FREEIMAGE Behavior - by TerryRitchie - 12-17-2023, 09:15 PM
RE: _FREEIMAGE Behavior - by SMcNeill - 12-17-2023, 10:03 PM
RE: _FREEIMAGE Behavior - by SMcNeill - 12-17-2023, 10:05 PM
RE: _FREEIMAGE Behavior - by TerryRitchie - 12-17-2023, 10:32 PM



Users browsing this thread: 1 Guest(s)