SDL_DestroyTray(3)

πŸ’– SDL_DestroyTray(3) πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where we are literally about to say goodbye to a tray icon πŸŽ€


✨ NAME ✨

SDL_DestroyTray β€” destroys a tray object. that's it, that's the whole job, and she does it flawlessly πŸ’…


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_tray.h>

void SDL_DestroyTray(SDL_Tray *tray);

like, look at her. one header, one function, zero drama (well, okay, a little drama, it's a destructor) πŸ¦‹


🫢 DESCRIPTION 🫢

so when you call this, the tray goes bye-bye πŸ‘‹ but here's the part that matters, no cap: this also destroys all associated menus and entries. all of them. every single one. the whole little family tree of menus and entries you built under that tray? gone. it's giving "we're clearing the whole group chat, not just muting it" 😭

so don't be out here thinking you can destroy the tray and then keep poking at those menus afterwards, because you cannot, and that's not a vibe you want πŸ”₯


πŸ’œ FUNCTION PARAMETERS πŸ’œ

  • tray β€” the tray icon to be destroyed. yes queen, hand her over πŸ’…

🧚 THREAD SAFETY 🧚

this one is important so listen up fr fr: this function should be called on the thread that created the tray. like, the same thread. the one that made it. the origin story thread πŸ‘‘

not me calling it from some random thread and then acting surprised when things go feral πŸ’€ don't do that. match the thread. periodt.


⭐ AVAILABILITY ⭐

this function is available since SDL 3.2.0. so if you're on anything older, bestie, she is simply not there πŸ™ˆ


🌈 SEE ALSO 🌈

  • SDL_CreateTray(3) β€” the one that started it all, the birth to this destruction, the yin to this yang πŸ’–

and that's the page!! tysm for reading, you ate that πŸ“

cute little sign-off time: this came to you from Simple Directmedia Layer, version SDL 3.4.18, and yes the date is in there too, it's the same page, it's the same energy, we're just saying it with love instead of in a footer πŸŽ€πŸ’–βœ¨
πŸ“¦ where this page comes from