destroy_bitmap(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

πŸ’– destroy_bitmap(3) πŸ’–

okay bestie, we're in the Allegro manual and today's main character is destroy_bitmap(3) β€” the Allegro game programming library's official "we're done here, clean up your mess" function. ✨


🌸 NAME 🌸

destroy_bitmap β€” destroys literally any type of created bitmap. That's it, that's the job. Allegro game programming library energy through and through. πŸŽ€


✨ SYNOPSIS ✨

#include <allegro.h>

void destroy_bitmap(BITMAP *bitmap);

look at her. one line. no return value. she simply does. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea, bestie: when you're finished with a bitmap, you call this. It destroys a memory bitmap, a sub-bitmap, a video memory bitmap, or a system bitmap β€” all of them, no discrimination, every type gets the same loving farewell. πŸ’–

If you pass a NULL pointer, this function won't do anything. Like, at all. It just vibes. No crash, no drama, nothing. 🫢

Now β€” the important part, and I need you to actually listen β€” see above for the restrictions as to when you are allowed to destroy the various types of bitmaps. Different bitmap types have different rules about when it's legal to send them off, and this function is not the one making those rules. So check before you yeet. 😭

🚨 also: the bitmap must not have a mouse cursor shown on it at the time it is destroyed. Like, at all. If there's a cursor on it, that's a problem. Handle that first, bestie, I'm begging. πŸ’€

🌈 SEE ALSO 🌈

  • create_bitmap(3) β€” the one that made it 🍼
  • load_bitmap(3) β€” the one that brought it in from a file πŸ“‚
  • show_mouse(3) β€” the one that put a cursor on it, which you need to deal with before you destroy it, per the vibe check above πŸ™ˆ

and that's the whole page, periodt. 🌟

Allegro, version 4.4.3 β€” yeah she's a classic, iconic, no notes. And the page footer says destroy_bitmap(3) on the right, so like, it's the manual page for destroy_bitmap(3), obviously, iykyk. πŸ§šπŸ’œ Mwah, go free your memory, bestie. πŸ”₯πŸ‘‘

πŸ“¦ where this page comes from