SDL_zeroa(3)
π SDL_zeroa π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where we're talking about SDL_zeroa β the macro that wipes an array's memory squeaky clean to zero β¨
πΈ NAME πΈ
SDL_zeroa β clear an array's memory to zero. that's it, that's the whole job, and she does it flawlessly π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_stdinc.h>
#define SDL_zeroa(x) SDL_memset((x), 0, sizeof((x)))
π¦ DESCRIPTION π¦
so like, this is a wrapper over SDL_memset that handles calculating the array size for you π«Ά which means there's no chance of copy/paste errors, and honestly? the code is just cleaner. it's giving responsible coding, it's giving main character energy.
β οΈ but listen β this requires an array, not an object, and not a pointer to an object. she's specific about that, okay? no cap.
π MACRO PARAMETERS π
xβ an array to clear. just hand her the array and she'll zero it out π
π THREAD SAFETY π
it is safe to call this macro from any thread π§ no drama, no locks, no fighting, just vibes β¨
β AVAILABILITY β
this macro is available since SDL 3.2.0 π so if you're on something olderβ¦ bestie, upgrade π
π SEE ALSO π
iykyk π
Simple Directmedia Layer β’ SDL 3.4.18 β’ SDL_zeroa(3)
and that's the whole page bestie π mwah, go zero those arrays, you ate ππ
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms