SDL_DestroyPalette(3)
π SDL_DestroyPalette(3) β SDL3 FUNCTIONS π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where today we are saying goodbye to a palette π¨β¨
πΈ NAME πΈ
SDL_DestroyPalette β frees a palette that you made with SDL_CreatePalette(). that's it. that's the whole job. it's giving closure π«Ά
β¨ SYNOPSIS β¨
#include <SDL3/SDL_pixels.h>
void SDL_DestroyPalette(SDL_Palette *palette);
π FUNCTION PARAMETERS π
paletteβ theSDL_Palettestructure that needs to be freed. yes queen, hand her over, she's done her time π
π¦ THREAD SAFETY π¦
good news!! it is safe to call this function from any thread π β as long as the palette isn't being modified or destroyed in another thread. so like, one thread at a time on this girl, we're not doing chaos here bestie π no double-destroying, that's not the vibe.
π AVAILABILITY π
this one's been around since SDL 3.2.0 β so if your SDL is older than that, she simply does not exist, no cap π«
π SEE ALSO π
SDL_CreatePalette(3)β the one that made her in the first place, iykyk π
fr fr the only rule: every palette youSDL_CreatePalette()deserves herSDL_DestroyPalette()moment. balance. main character energy for the allocator. periodt π
and that's the page!! brought to you by Simple Directmedia Layer, running the iconic SDL 3.4.18 β thanks for reading my little manual rant, mwah ππ§β
π¦ 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