GEN*() but no FREE*() ?

Previous topic - Next topic

mahan

Hi guys,

How do you release generated handles to Sprites, Files, Sounds etc.?

Since GLBasic has commands like GENSPRITE(), GENFILE() etc, I'd expect functions to release the generated handles (and associated resources) somehow, but I just don't get how. You got a command or algorithm for that?

I'm pretty sure I've seen something about this before on the forums but I could not find it now.


(Search words for the future: FreeSprite, ReleaseSprite, Free, Release, Handle, KillSprite, Kill)

Ozden79

For example, you use LOADSPRITE to load an image to an index you selected from a file. To free it, just use LOADSPRITE "",MyIndex...

That mechanic works for other items as well...

Ian Price

If you load a sprite with "LOADSPRITE "image.bmp",1 then you can free it by using "LOADSPRITE "",1
I came. I saw. I played.

mahan

Thank you both, very much!  :)