SDL_DestroyWindow(3)
π SDL_DestroyWindow β bestie edition π
okay so this is SDL_DestroyWindow(3), a real one from the SDL3 FUNCTIONS manual, and we're gonna get into it. no cap, this page is short but it's giving important. β¨
π NAME π
SDL_DestroyWindow β destroy a window. bye-bye, window. π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_video.h>
void SDL_DestroyWindow(SDL_Window *window);
π¦ DESCRIPTION π¦
so like. you call this and the window gets destroyed. that's the whole vibe. π₯
but wait β the plot twist: any child windows owned by the window will be recursively destroyed as well. yes, recursively. the whole family tree gets taken out together, it's giving generational. πΈ
and now the part you need to know, bestie: on some platforms, the visible window may not actually be removed from the screen until the SDL event loop is pumped again, even though the SDL_Window is no longer valid after this call. so the pixels might still be chilling on your screen for a sec while the actual object is already gone. don't touch that pointer afterward, fr fr. π
π FUNCTION PARAMETERS π
windowβ the window to destroy. that's it. that's the whole parameter. slay. π
π§ THREAD SAFETY π§
this function should only be called on the main thread. main character energy only, no side quests from other threads. periodt. π«
π AVAILABILITY π
this function is available since SDL 3.2.0. so if you're on something older, sorry babe, it's not there. π«Ά
β SEE ALSO β
like, if you're destroying windows you probably made some windows, so. iykyk. π
okay that's the whole page, you ate that. this little manual moment came to you from Simple Directmedia Layer, version SDL 3.4.18, dated SDL_DestroyWindow(3) β mwah, take care of your windows and your windows will take care of you. πβ¨π¦
π¦ 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