al_free(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

πŸ’– al_free(3) β€” bestie edition πŸ’–

okay so this is al_free(3) from the Library Functions Manual, and it's giving Allegro 5 API realness. ✨

✨ NAME ✨

al_free β€” Allegro 5 API πŸ‘‘

πŸŽ€ SYNOPSIS πŸŽ€

              #include <allegro5/allegro.h>

              #define al_free(p) \
                 (al_free_with_context((p), __LINE__, __FILE__, __func__))

🌸 DESCRIPTION 🌸

Like free() in the C standard library, but plot twist: the implementation may be overridden. πŸ’…

Also, on Windows, a memory block allocated by one DLL must be freed from the same DLL. no cap β€” same DLL, bestie. So in the few places where an Allegro function returns a pointer that must be freed, you must use al_free(3) for portability to Windows. 🫢

This is a macro. πŸ¦‹

πŸ¦‹ SEE ALSO πŸ¦‹

πŸ’– from the Allegro reference manual β€” no date on this page, bestie β€” periodt πŸ’–

πŸ“¦ where this page comes from
  • arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms