|
al_uninstall_system() vs destroy()? |
AleaInfinitus
Member #18,873
December 2020
|
Right now I'm just calling destroy functions for my font, display, timer, bitmaps, etc. at the end of program execution. Is this all necessary or could I replace it all with just al_uninstall_system()? I've seen people talking about it, but no clear on answer on what it actually handles. |
amarillion
Member #940
January 2001
|
In general, it's a good habit to clean up your resources one by one before you call al_uninstall_system(). If you don't, you might get away with it most of the time, but I've seen bugs crop up because certain objects weren't destroyed. For example, if you do not destroy audio stream objects, a thread will keep running and your game won't shut down properly. -- |
AleaInfinitus
Member #18,873
December 2020
|
So I should be calling uninstall system alongside my destroy functions? |
amarillion
Member #940
January 2001
|
Yes, it is my understanding that you have to call both. -- |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Some things are cleaned up automatically like bitmaps, but not everything so yeah do both. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|