Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CleanUp Routine, FREEIMAGE, FREEFONT
#2
You have to make certain that you aren't trying to free a resource that's still in use somewhere.

For example:

tempscreen = _newimage(600,400,32)
_DEST _tempscreen
_FONT foo

...stuff

_DEST _differentscreen
_FREEFONT foo

That above would still cause issues as foo is the active font for tempscreen, even though tempscreen has now moved into a background position and isn't active.  What you'd need to do first is:

_DEST _tempscreen
_FONT 16 'swap to the default font
_FREEFONT foo

Remove that font from active duty on all screens, and then you shouldn't have any issues with freeing it for good from your program.
Reply


Messages In This Thread
RE: CleanUp Routine, FREEIMAGE, FREEFONT - by SMcNeill - 05-23-2024, 01:48 AM



Users browsing this thread: 1 Guest(s)