SDL_DestroyEnvironment(3)

πŸ’– SDL_DestroyEnvironment(3) β€” the SDL3 FUNCTIONS girlies' edition ✨

okay so bestie, you've got a pile of environment variables and you need them GONE. not hidden, not forgotten β€” destroyed. and that's literally what this function is for. welcome to the SDL_DestroyEnvironment page, she's short but she's iconic πŸŽ€


🌸 NAME 🌸

SDL_DestroyEnvironment β€” Destroy a set of environment variables.

like, yeet the whole environment. bye. πŸ’…


✨ SYNOPSIS ✨

#include <SDL3/SDL_stdinc.h>

void SDL_DestroyEnvironment(SDL_Environment *env);

no return value, no drama, she just does the thing πŸ¦‹


🫢 FUNCTION PARAMETERS 🫢

  • env β€” the environment to destroy. that's the one. hand her over and she's gone πŸ₯€

πŸ”₯ THREAD SAFETY πŸ”₯

It is safe to call this function from any thread, as long as the environment is no longer in use.

no cap, that "as long as" part is doing a LOT of heavy lifting. if something else is still out here using that environment, don't. just don't πŸ™ˆ


⭐ AVAILABILITY ⭐

This function is available since SDL 3.2.0. so if you're on something older, sorry bestie, it's giving "not in your version" 😭


πŸ‘‘ SEE ALSO πŸ‘‘

  • SDL_CreateEnvironment(3) β€” the one who made her in the first place. you can't destroy what you never created, iykyk 🌈

that's the whole page fr fr. short, sweet, main character energy. go forth and free your environments responsibly 🧚

with love from the Simple Directmedia Layer girlies πŸ’– β€” this is SDL 3.4.18, and yes this page is literally titled SDL_DestroyEnvironment(3), we keep it consistent around here πŸŽ€βœ¨

πŸ“¦ where this page comes from