SDL_ONAPPLICATIONDIDRECEIVEMEMORYWARNING(3)

SDL_OnApplicationDidReceiveMemoryWarning πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, this one's a whole vibe and also a very specific one, so let's get into it ✨


✨ NAME ✨

SDL_OnApplicationDidReceiveMemoryWarning β€” the lil function that lets iOS apps with their own external event handling report onApplicationDidReceiveMemoryWarning 🫢


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_system.h>

void SDL_OnApplicationDidReceiveMemoryWarning(void);

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜• β€” this function lets iOS apps that have their own event handling hook into SDL so they can generate SDL events. it's giving bridge energy πŸŒ‰

it maps directly to an iOS-specific event, but β€” and this is the plot twist β€” since it doesn't actually do anything iOS-specific internally, it's available on all platforms, just in case it might be useful for some specific paradigm. lowkey iconic of it honestly πŸ’…

ngl bestie, most apps do <strong>not</strong> need to use this directly. SDL's own internal event code will handle all of this for windows created by SDL_CreateWindow! so like… if you're not doing the custom event handling thing, this is not your moment, and that's okay πŸŽ€

πŸ’œ THREAD SAFETY πŸ’œ

it is safe to call this function from any thread. go off, queen πŸ‘‘


⭐ AVAILABILITY ⭐

this function has been available since SDL 3.2.0 🌈


πŸŽ€ SEE ALSO πŸŽ€

no SEE ALSO references in this one bestie, we're flying solo πŸ¦‹


and that's the whole page, no cap. this gem lives in the Simple Directmedia Layer manual, SDL 3.4.18, and yes the header is technically SDL_OnApplica...MemoryWarning(3) because even manpages gotta abbreviate when they run out of room 😭 stay hydrated, check your memory warnings, and slay πŸ’–βœ¨πŸŒΈπŸ«Ά

πŸ“¦ where this page comes from