destroy_gfx_mode_list(3alleg4)
π destroy_gfx_mode_list π
okay bestie, so this is a page from the Allegro manual (that's the game programming library, iykyk), and today we're talking about the function that does the cleanup nobody wants to do but everybody needs to do. it's giving responsible queen energy. β¨
β¨ NAME β¨
destroy_gfx_mode_list β frees the list that get_gfx_mode_list() made for you. part of the Allegro game programming library, no biggie. π
πΈ SYNOPSIS πΈ
#include <allegro.h>
void destroy_gfx_mode_list(GFX_MODE_LIST *mode_list);
π¦ DESCRIPTION π¦
so basically: get_gfx_mode_list() goes out there and builds you a whole list of graphics modes, right? super helpful, love that for you. but that list is sitting in memory, and memory is not infinite, bestie. π
destroy_gfx_mode_list() removes the mode list created by get_gfx_mode_list() from memory. poof. gone. β¨
the vibe check here is simple: use this function once you are done with the generated mode list, so you don't get memory leaks in your program. leaks are not the moment. nobody wants a program that hoards memory like it's collecting squishmallows. π§
π SEE ALSO π
get_gfx_mode_list(3alleg4)β the one that makes the list, the prequel π«set_gfx_mode(3alleg4)β the one that actually sets your mode πset_color_depth(3alleg4)β the one handling your color depth, slay π
and that's the whole page, periodt. π«Ά this was Allegro version 4.4.3, so if you're out here running an older Allegro, keep that in mind β and yeah, this whole thing is part of the Allegro manual, destroy_gfx_mode_list(3alleg4), iconic, no cap. now go free your memory bestie πβ
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms