Why FreeImage?

Blitz3D Forums/Blitz3D Beginners Area/Why FreeImage?

blade007(Posted 2008) [#1]
Why do we use FreeImage? Would the memory automatically be destroyed when the window closes without FreeImage?


GfK(Posted 2008) [#2]
What if you want to get rid of a temporary image but don't want to end the game?


Kryzon(Posted 2008) [#3]
Exactly. All the "FreeSomething" commands are while you're in-game and want to spare mahmory. No need to do them as the last thing in your game, as most people do (like, a FreeAll() function, then END).


Zethrax(Posted 2008) [#4]
As stated/implied above, all resources used by a program are closed, destroyed, etc, automatically when the program ends.


Kryzon(Posted 2008) [#5]
Just to finish the subject, is there any memory resource that may be kept after the program finishes? something like a Bank, or Type, or Array?

Or is everything finished?


Ross C(Posted 2008) [#6]
Everything is destroyed. There might be some data left in a cache somewhere, but that information is overwritten when nessesary.


Kryzon(Posted 2008) [#7]
Thank you, Ross C.


PowerPC603(Posted 2008) [#8]
So, in fact, you don't have to create a FreeAll function to destroy all meshes, sounds, type-instances, textures, pictures, ... when you end the game?

Or does the "End" command do all that internally (frees all loaded meshes, sounds, types, ...)?


Kryzon(Posted 2008) [#9]
No you don't.
And we know there's like millions of people that do it...

I believe the END command does nothing other than end the program, IMO.
I think the one who purges the resources is Windows, after realising that the program has ended.

Again, up to someone with more in-depth knowledge to answer definately.