Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
When to free an image?
#4
(04-13-2023, 05:02 PM)SMcNeill Wrote: ..
DO
   handle = LOADIMAGE..
   'Stuff
LOOP
END

Now with the above here, you're going to have problems.  You're loading images repeatedly in the  DO LOOP, and you're never freeing them.  You, my friend, now have a massive memory leak and all the issues that arises from such!
good to know.

What happens here? 
----------------------
DO
   handle= _NEWIMAGE...
   handle = LOADIMAGE..
   'Stuff
LOOP
END
---------------------------
Reply


Messages In This Thread
When to free an image? - by James D Jarvis - 04-13-2023, 02:54 PM
RE: When to free an image? - by TerryRitchie - 04-13-2023, 03:28 PM
RE: When to free an image? - by SMcNeill - 04-13-2023, 05:02 PM
RE: When to free an image? - by James D Jarvis - 04-13-2023, 05:45 PM
RE: When to free an image? - by mnrvovrfc - 04-13-2023, 06:26 PM
RE: When to free an image? - by OldMoses - 04-16-2023, 08:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  graceful way to test for a valid image handle such as before doing _FreeImage? madscijr 7 1,022 11-11-2025, 03:50 PM
Last Post: madscijr
  A strange experience with forum posting an image TempodiBasic 2 535 06-17-2025, 06:01 AM
Last Post: TempodiBasic
  QB64PE programming challenge? auto-convert image to photoreal etch-a-sketch drawing madscijr 9 1,832 02-14-2025, 05:49 PM
Last Post: madscijr
Rainbow Kenney Game Assets All-in-1 Free Day - on itch.io - not spam grymmjack 17 4,622 09-21-2023, 08:34 PM
Last Post: James D Jarvis
  Fastest image refresh TerryRitchie 2 828 03-06-2023, 11:18 PM
Last Post: TerryRitchie

Forum Jump:


Users browsing this thread: 1 Guest(s)