Jump to content
  • Advertisement
Sign in to follow this  
Stompy9999

atExit question...

This topic is 4842 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This is probably a dumb question, but can atexit() be used on allegro_exit like it can on SDL_Quit()? I'm asking because in my current game, the game is crashing because allegro_exit isn't being called for some reason. I would like to make sure that allegro_exit is being called no matter what. On a related note, can calls to destroy_bitmap() be made with atexit() as well?

Share this post


Link to post
Share on other sites
Advertisement
It can be used on all functions with no parameters (eg sample(void)). You can find more info here. The page will explain how the order of calling works.

Share this post


Link to post
Share on other sites
Allegro already hooks the allegro_exit with atexit. Are you positive it crashes because of this?

In any case a new version just came out (4.2 beta3), with a good number of bugfixes. If you haven't already, please upgrade and see if the problem persists! This is especially urgent if you have a hyper-threading cpu or multiple cpus as there have been many problems with thread race bugs happening while exiting allegro with previous versions.

If the problem persists, please post it at the allegro development forum (or at the sourceforge mailinglist/bugtracker) to tracck it down.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!