al_destroy_display
void al_destroy_display(ALLEGRO_DISPLAY *display)
Introduced in 5.0.0
Destroy a display.
If the target bitmap of the calling thread is tied to the display, then it implies a call to "al_set_target_bitmap(NULL);" before the display is destroyed.
That special case notwithstanding, you should make sure no threads are currently targeting a bitmap which is tied to the display before you destroy it.
See also: al_set_target_bitmap
Examples: ex_blend_bench, ex_display_options, ex_drawpixels, ex_dualies, ex_fs_resize, ex_fs_window, ex_mouse_focus, ex_multiwin, ex_noframe, ex_resize2, ex_threads, ex_threads2, ex_warp_mouse, ex_windows, ex_winfull
Most helpful discussions:
- Is using TTFs really that complicated?
- Having Trouble with exit(1) - Stalling Program
- My second game, space invader simplified
- Vivace extra points. Its there a better way of doing this one.
- I'm new
- al_map_rgb() only works after al_init() contrary to the documentation
- Key-presses speed-up program
- Is Allegro5 compatibale with Chrome OS
- ALLEGRO_EVENT_DISPLAY_SWITCH_OUT
- Segfault in al_show_native_file_dialog()
Other recent discussions:
- Program locks on exit (linux only)
- Keyboard Modifiers flag on Windows?
- Multiple threads/displays, Event handling question
- Mipmap causing texture bleeding
- Crasehs when use primitive functions
- Difficulty compiling on Windows
- Screen is cleared and a new one appears Allegro5 in C?
- Allegro Access Violation while Drawing
- A little bit of fun for family and friends
- KrampusHack 2020: Odd Results With Color Mapping Functions