The Allegro Wiki is migrating to github at https://github.com/liballeg/allegro_wiki/wiki

Al destroy bitmap

From Allegro Wiki
Jump to: navigation, search

Names

al_destroy_bitmap - frees all resources associated with an AL_BITMAP, returning them to the OS

al_destroy_display_bitmap - frees all resources associated with an AL_DISPLAY, returning them to the OS

C Specifications

void al_destroy_bitmap(AL_BITMAP* bitmap)

void al_destroy_display_bitmap(AL_DISPLAY *display)

Parameters

In both cases there is only one parameter - the bitmap to be destroyed.

Description

These functions release all resources allocated to your program for a particular AL_BITMAP/AL_DISPLAY back to the OS. After calling these functions, no attempt should be made to use the AL_BITMAP/AL_DISPLAY destroyed.

Notes

Destroys a bitmap. The memory and resources associated with the bitmap are released. If the bitmap was a display bitmap in full-screen mode then the resolution of the monitor is reset. Destroying parents of sub-bitmaps will not destroy the sub-bitmaps; instead the sub-bitmaps become invalid and should no longer be used.

Errors

These functions will never fail.

API Branch

Graphics

See Also