Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Memory full when loading multiple images
#6
There's just one glaring problem with what bplus wrote, which might affect you, and that's if you're calling _LOADIMAGE inside a sub.

Code: (Select All)
SUB Foo
    temp = _LOADIMAGE("whatever.png",32)
    ...  stuff
END SUB

It won't matter if you add that style IF before that _LOADIMAGE statement, as temp is *always* going to be 0 and you're *always* going to be loading images without freeing them.

You need to _FREEIMAGE your stuff once it goes out of scope and isn't being used any more.

OR

You need to simply load your images ONCE when the program starts up and initializes, and then use and resuse those same image handles over and over inside your program where they're needed.



Without sharing the code, there's no way anyone can tell you where to place a _FREEIMAGE statement.   Share what you have, and then we can help point out what might be the best solution for your problems, so you can fix them and move forward without your memory leaking.  Wink
Reply


Messages In This Thread
RE: Memory full when loading multiple images - by SMcNeill - 11-03-2024, 02:49 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  about Hardware Images and _DisplayOrder,Help! qbfans 11 546 02-11-2026, 07:10 AM
Last Post: SMcNeill
  Nth problem with hardware images Ikerkaz 9 481 01-23-2026, 02:58 PM
Last Post: bplus
  Hardware images questions Dav 5 462 12-04-2025, 04:18 PM
Last Post: Pete
  Hardware images...Talk to me! Unseen Machine 5 728 09-22-2025, 11:12 PM
Last Post: TempodiBasic
  Loading from file into _MEM? and LEN a TYPE... Unseen Machine 9 958 08-03-2025, 02:55 AM
Last Post: SMcNeill

Forum Jump:


Users browsing this thread: 1 Guest(s)