Allocate dynamic memory for an SDL event.
Defined in <SDL3/SDL_events.h>
void * SDL_AllocateEventMemory(size_t size);
size | the amount of memory to allocate |
Returns a pointer to the memory allocated or NULL on failure; call SDL_GetError() for more information.
You can use this to allocate memory for user events that will be automatically freed after the event is processed.
This function is available since SDL 3.0.0.
CategoryAPI, CategoryAPIFunction